How do I start MySQL server without using startup script /etc/init.d/mysql?

How do I start MySQL server without using startup script /etc/init.d/mysql?

To start the MySQL server without using the startup script, you can use the "mysqld" command with the appropriate options. The "mysqld" command is the MySQL server daemon that manages the MySQL server process. It can be used to start, stop, or restart the MySQL server, and to configure various options and settings.

To start the MySQL server without using the startup script, follow these steps:

  1. Open a terminal window.

  2. Change to the MySQL data directory. The MySQL data directory is typically located at "/var/lib/mysql". For example:

refe‮‬r to:lautturi.com
cd /var/lib/mysql
  1. Start the MySQL server by using the "mysqld" command with the appropriate options. For example:
mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

This will start the MySQL server with the specified options. Consult the documentation of the "mysqld" command for more information on the available options and their meanings.

With these steps, you should be able to start the MySQL server without using the startup script. Keep in mind that starting the MySQL server in this way may not automatically enable it to start at boot time, and you may need to configure the startup options manually or use the startup script to ensure that the MySQL server is started automatically when the system boots. Consult the documentation of MySQL and your operating system for more information on how to configure and manage the MySQL server.

Created Time:2017-10-28 21:38:56  Author:lautturi