shher

导航

2014 Centos 6 minimal 安装mysql5

1.安装:#yum -y install mysql-server

2.修改配置:#vi /etc/my.cnf

暂时修改一下编码(添加在密码下方添加): default-character-set = utf8



# chkconfig mysqld on  ← 设置MySQL服务随系统启动自启动
# chkconfig –list mysqld  ← 确认MySQL自启动mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 如果2–5为on的状态就OK

#service mysqld start     (# /etc/rc.d/init.d/mysqld start也可以)

mysql -uroot -p
select user,host,password from mysql.user
update mysql.user set password=password('123456') where user='root';
select user,host,password from mysql.user;
exit 

service mysql restart;

 

AllowOverride

 

 

 

netstat -ntlp

posted on 2014-08-02 15:34  shher  阅读(200)  评论(0编辑  收藏  举报