yangliuhepanpan 2016-11-23
1. 查看centos版本号:
lsb_release -a
2. 查看mysql服务是否开机启动:
http://www.cnblogs.com/panjun-Donet/archive/2010/08/10/1796873.html
chkconfig --list |grep mysqld
mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig mysqld on
chkconfig --list|grep mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
3. 修改mysql root用户密码
update mysql.user set password=password('xxxx') where user='root';
flush privileges;