mysql 相关

----------------------------------------------安装-----------------------------------------------------------------

yum -y install mysql-server

service mysqld start

mysql -u root -p

 

//初始化密码

UPDATE user SET password = PASSWORD(123456) WHERE user = 'root'

//update mysql.user set authentication_string=password('123456') where user='root';   -- new in 5.7.xxxx

flush privileges;

//远程可访问

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

flush privileges;

----------------------------------------------查看连接数-----------------------------------------------------------------

mysqladmin -uroot -p123456 processlist

 

posted @ 2016-02-26 11:26  聆听自由  阅读(114)  评论(0编辑  收藏  举报