centos下mysql安装

首先yum search mysql

发现mysql-server.x86_64 : The MySQL server and related files

安装 yum install mysql-server
不知道为什么,我安装完之后启动不了,一直显示启动失败,然后就去看下日志less /var/log/mysqld.log。
提示Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
然后可以跳过验证启动/usr/libexec/mysqld --skip-grant
进去后发现用户信息表没建立,还是不行啊,于是乎。
执行了./usr/bin/mysql_install_db,他会把系统相关的表重新建立。
第一次启动的时候显示如下信息


 

猜你喜欢

转载自ztreal.iteye.com/blog/1669761