Start/Stop MySQL
how to start MySQL : (in this article, install MySQL in/usr/local/mysql for example)
The code is as follows |
Copy Code |
#/usr/local/mysql/share/mysql.server Start |
If the installation directory is using the default, please use the
The code is as follows |
Copy Code |
/usr/local/etc/rc.d/mysql-server Start|stop|restart |
Note Before the first execution, the mysql.server should be set to executable (chmod 744 mysql.server), in addition to this line of instructions can be added to the/etc/rc.d/rc.local file, so that MySQL in the boot automatically.
To stop the MySQL method:
The code is as follows |
Copy Code |
#/usr/local/mysql/bin/mysqladmin Shutdown |
If you set a password for the MySQL Administrator root account (not the root of the operating system), you must stop MySQL as follows, and MySQL will ask for your root password before performing shutdown work:
code is as follows |
copy code |
#/usr/ Local/mysql/bin/mysqladmin-u root-p shutdown |