Problem Description: Start MySQL tip: another MySQL daemon already running with the same UNIX socket
Workaround:
start or restart MySQL unsuccessful, hint: another MySQL daemon already running with the same UNIX socket
This problem often occurs
the last time MySQL was shut down unexpectedlyThe easiest way to solve this problem is to find
mysql.sock file deleted, and then restart Mysqld to succeed.Find
UpdateDB
Locate Mysql.sockCompletely uninstall MySQL 01, check whether MySQL exists or not
rpm-qa | grep mysql2. Turn off MySQL service Ss-ln | grep 3306 #查看是否开启MySQL/etc/init.d/mysqld stop or service mysqld stop3, view installation file directory uninstall rpm
yum remove MySQL mysql-server mysql-libsFind/-name mysqlrm-rf xxx04, delete mysql user
userdel-r MySQLProblem Description: Missing this shared library libmysqlclient.so.16 may be missing link file for library file or library file
[email protected] mysql]# Mysqlmysql:error whileLoading shared libraries:libmysqlclient.so. -: Cannot open sharedObject file: No Suchfileor Directory[[email protected] mysql]# service mysqld start/usr/bin/mysqladmin:error whileLoading shared libraries:libmysqlclient.so. -: Cannot open sharedObject file: No Suchfileor Directorycannot check forMySQL Daemon startup because of mysqladmin failure. Starting mysqld: [FAILED]
Workaround:
Yum Remove Mysql-libs #卸载
Yum install-y mysql-libs #在安装
Problem Description: Missing mysql.hosts file
Problem solving:
View Logs
CAT/ETC/MY.CNF #查看日志存放的位置
Tail/var/log/mysqld.log
[Email protected] mysql]#Tail/var/log/Mysqld.log160912 Ten: Wu: in[ERROR] Fatal Error:can'T Open and lock privilege tables:table'Mysql.host'doesn'T exist160912 Ten: Wu: inMysqld_safe mysqld from PIDfile/var/run/mysqld/Mysqld.pid ended160912 Ten: Wu: +Mysqld_safe starting mysqld daemon with databases from/var/lib/MySQL/usr/libexec/mysqld:table'Mysql.plugin'doesn'T exist160912 Ten: Wu: +[ERROR] Can'T open the Mysql.plugin table. Please run Mysql_upgrade to create it.160912 Ten: Wu: +Innodb:initializing buffer pool, size =8.0M160912 Ten: Wu: +innodb:completed initialization of buffer pool160912 Ten: Wu: +innodb:started; Log sequence Number0 44233160912 Ten: Wu: +[ERROR] Fatal Error:can'T Open and lock privilege tables:table'Mysql.host'doesn'T exist160912 Ten: Wu: +Mysqld_safe mysqld from PIDfile/var/run/mysqld/mysqld.pid Ended
See the need to initialize the database from the log
mysql_install_db
[email protected] mysql]# mysql_install_db installing MySQL system tables ... Okfilling Help Tables ... OKto start mysqld at boot TimeYou have to Copysupport-files/mysql.server to the right place foryour systemplease REMEMBER to SET A PASSWORD for the MySQL root USER! to DoSo, start the server, Thenissue the following commands:/usr/bin/mysqladmin-u Root Password'New-password'/usr/bin/mysqladmin-u root-h upday Password'New-password'Alternatively you can run:/usr/bin/mysql_secure_installationwhichWould also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended forproduction servers. See the manual for Moreinstructions. You can start the MySQL daemon with:cd/usr; /usr/bin/mysqld_safe &can test the MySQL daemon with MySQL-test-RUN.PLCD/usr/mysql-test;Perlmysql-test-run.plplease Report any problems with the/usr/bin/mysqlbug script!
Set MySQL password
mysqladmin-u root password ' 123123 '
Log in to MySQL
mysql-u root-p
Memories of the past
Reference http://www.cnblogs.com/kerrycode/p/4364465.htmlhttp://www.cnblogs.com/ayanmw/p/3434028.html
Http://www.cnblogs.com/ylqmf/archive/2011/10/17/2215726.html
MySQL Error rollup