./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).