At the beginning, MySQL was built with RedHat. What is startup/rc. d/init. d/start
This is very simple, but later I learned more and more about MySQL, some of which are too low, some are
The earlier MySQL version required for the Web service that you want to install
Later, I learned to install MySql in tar. My MySQL is installed in the/usr/local/MySQL directory to start
I have encountered many problems. The most common is:
Error 2002: Can't connect to local MySQL server through socket
'/Tmp/MySQL. Sock' (111)
Solution:
[Root @ test MySQL] #/usr/local/MySQL/bin/mysqladmin-u root/
>-S/var/lib/MySQL. Sock password 'your. passwd'
Or make a connection.
Ln-S/var/lib/MySQL. Sock/tmp
In fact, the error message "/tmp/MySQL. Sock" is not found in the/tmp directory.
The command is incorrect. I have encountered
Several Common Startup methods are not clearly remembered. If you are sure that mysql. Sock is available under TMP
File. Try other commands.
/Usr/local/MySQL/bin/MySQL-u root-P
/Usr/local/MySQL/bin/mysqld -- user = MySQL &
/Usr/local/MySQL/bin/mysqld -- user = root &
/Usr/local/MySQL/bin/mysqld_safe -- user = root &
/Usr/local/MySQL/bin/mysqld_safe -- user = MySQL &
/Usr/local/MySQL/bin/safe_mysqld -- uer = root &
Stopping server from PID File
/Usr/local/MySQL/data/localhost. localdomain. PID
060304 11:46:21 mysqld ended
This is a permission issue. My MySQL directory belongs to the root user and also belongs to the root group. You can use mysqld_safe to start MySQL,
You only need to pay attention to these MySQL, safe_mysqld, mysqld_safe, mysqld, and mysqladmin. Try multiple times.
Times
In fact, sometimes MySQL has started normally and check whether MySQL has started the command.
PS-Aux | grep mysqld
You will see the following similar content
MySQL 6394 0.0 1.5 10528 992 pts/3 S
/Usr/local/MySQL/
MySQL 6395 0.0 1.5 10528 992 pts/3 S
/Usr/local/MySQL/
MySQL 6396 0.0 1.5 10528 992 pts/3 S
/Usr/local/MySQL/
Root 6422 0.0 1.1 2408 732 pts/3 s grep
MySQL
Check whether MySQL is listening for port commands
Netstat-Tl | grep MySQL
You will see the following similar content
TCP 0 0 *: MySQL *: * listen