Rhel 6.5 + MySQL 5.6 compiled and installed.
The installation process was smooth.
--datadir=/data/project/db1/mysql/data
--datadir=/data/project/db1/mysql/data
--socket=/tmp/mysql.sock
The my.cnf file is placed in the /data/project/db1/mysql/data.
Start normally.
Using MySQL to connect to the server, error:
[ [email protected] /data/project/db1/mysql]# mysql -uroot
ERROR 2002 (HY000): can ' t connect to local mysql server through socket '/var/lib/mysql/mysql.sock ' (2)
Check MY.CNF configuration, did not find problems, tossing a long time (online also search, have not found the root cause of the problem), found that the local server was installed before the binary MySQL client program. Installed through Yum. Uninstall the MySQL client.
#yum Erase MySQL
Again login MSYQL server try, everything OK. No longer prompt for errors.
Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)