The yum installation of MySQL eliminates many of the steps of the source package installation, but sometimes when MySQL yum finishes packing MySQL, it fails to start when the MySQL service starts, error: Can ' t connect to local MySQL server Through socket '/tmp/mysql.sock ' (2), cannot find the Mysql.sock file, the Mysql.sock file will not appear until after the MySQL is installed, so after installing the package, do the steps:
Add the Mysqld service.
/sbin/chkconfig–-add mysqld [Add MySQL service in the service list]
Then start MySQL.
Service mysqld start; (i.e./etc/init.d/mysqld start. can also be set to boot from:/sbin/chkconfig mysqld on)
Then, the amount ... What to do if the "MySQL Daemon failed to start" message appears? This is how you solve it.
1. Initializing the database
/usr/bin/mysql_install_db--user=mysql
CP/USR/SHARE/MYSQL/MY-SMALL.CNF/ETC/MY.CNF (optional)
2. Log in to MySQL in safe mode
CD/USR;
/usr/bin/mysqld_safe &
3. When you start the Mysqld service again.
Yum mode install MySQL error mysql.sock not found