mysql

(1) 服务器的 IP (192.168.1.248)

(2) 包 (MySQL-server-5.6.17-1.el6.x86_64.rpm) (MySQL-client-5.6.17-1.el6.x86_64.rpm) (MySQL-shared-compat-5.6.17-1.el6.x86_64.rpm)

(3) 以 root 登入

(4) rpm -i MySQL-shared-compat-5.6.17-1.el6.x86_64.rpm

(5) rpm -ivh MySQL-server-5.6.17-1.el6.x86_64.rpm

(6) rpm -ivh MySQL-client-5.6.17-1.el6.x86_64.rpm

(7) 在/root/.mysql_secret 下找到随机的密码

(8) service mysql restart

(8) whereis mysql (找到 mysql ), /usr/bin/mysql -uroot -p  登进 mysql

(9)

ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

(10)

SET PASSWORD = PASSWORD('new_password');

(11)  http://dev.mysql.com/doc/refman/5.6/en/alter-user.html

 

(12) 把权限赋给 其他的 机器(远程机器可以连接)

       use mysql;

       update user set host='%' where user='root' and host='localhost';

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

       flush privileges;

你可能感兴趣的:(mysql)