MYSQL环境搭建,百试不爽系列

第一步

完成的命令
C:\Windows\system32>g:
G:\>cd G:\database\mysql\bin
G:\database\mysql\bin>mysqld --initialize --user=mysql --console
G:\database\mysql\bin>mysqld  -install
G:\database\mysql\bin>net start mysql
G:\database\mysql\bin>mysql -u root -p
Enter password: ************
mysql> alter user root@localhost identified by "12345";
mysql> show variables like 'character%';

 

mysqld --initialize --user=mysql --console

mysqld  -install

net start mysql

mysql -u root -p

alter user root@localhost identified by "12345";
--------------------- 
作者:王小雷-多面手 
来源:CSDN 
原文:https://blog.csdn.net/dream_an/article/details/51058710 
版权声明:本文为博主原创文章,转载请附上博文链接!

第二步

#修改加密规则

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

#更新密码(mysql_native_password模式)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '12345';

作者:河岸飞流
出处:http://www.cnblogs.com/xieshuang/

posted @ 2019-01-10 00:14  bH1pJ  阅读(17)  评论(0编辑  收藏  举报