When I installed MySql in Susi, I encountered the following problem: I added a link file MySQL under/sbin/to point to/usr/local/MySQL/bin/MySQL, after the MySQL server is started, run the command $:>/usr/local/MySQL/bin/MySQL-u root-P enter password: *** to log on successfully, however, you cannot directly execute MySQL, as shown in the following figure: $:> mysql-u root-penter password: *** logon Failure: Error 2002 (hy000) cannot connect to local MySQL server throught socket '/var/lib/MySQL. socket '(2 ). why ?? Analysis: $:> which MySQL/usr/bin/MySQL indicates that MySQL executed at the prompt is not mysql in/sbin but msql in/usr/bin. run $:> echo $ path/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/sbin: /usr/x11r6/bin:/usr/sbin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/MIT/bin: /usr/lib/MIT/sbin
Run/usr/bin in front of/sbin/, and then there is a MySQL in the/usr/bin directory. After deletion, it will be fine.
.