Mysql安裝時遇到錯誤與解決方法

./scripts/mysql_install_db --user=mysql --datadir=/data/mysql

Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解決 yum install -y libaio.so.1
如果安裝mysql出現了以上的報錯信息.這是卻少numactl這個時候如果是Centos就yum -y install numactl就可以解決這個問題了.
ubuntu的就sudo apt-get install numactl就可以解決這個問題了

輸入 mysql -u root 登錄 mysql 的時候出現以下錯誤:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
出現這個問題的原因是沒有生成 mysql.sock 文件,沒有生成這個文件的原因是 /usr/local/mysql 目錄的權限不對:
chown -R mysql:mysql /usr/local/mysql 即可解決
問題
[root@localhost ~]# service mysqld restart
ERROR! MySQL server PID file could not be found!
Starting MySQL.... ERROR! The server quit without updating PID file (/data/mysql/localhost.localdomain.pid).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章