mysql 8 修改root 密码

主要参考:https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

需要注意的是创建文件的时候需要保存为 utf-8 无 BOM格式的不然容易报错。

C:\Users\esen>mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --init-file="D:\mysql-inital-file.txt" --console 2018-08-07T08:58:48.796734Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.11)  MySQL Community Server - GPL.

2018-08-07T08:58:54.366103Z 0 [Warning] [MY-011071] [Server] option 'read_buffer_size': unsigned value 0 adjusted to 8192
2018-08-07T08:58:54.366135Z 0 [Warning] [MY-011071] [Server] option 'read_rnd_buffer_size': unsigned value 0 adjusted to 1
2018-08-07T08:58:54.366184Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-08-07T08:58:54.368433Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.11) starting as process 7548
2018-08-07T08:58:56.136588Z 0 [ERROR] [MY-011071] [Server] Can't open shared library 'C:\Program Files\MySQL\MySQL Server 8.0\lib\plugin\mysqlx' (errno: 126 找不到指定的模块。)
2018-08-07T08:58:56.139291Z 0 [ERROR] [MY-010736] [Server] Couldn't load plugin named 'mysqlx' with soname 'mysqlx'.
2018-08-07T08:58:57.134929Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-08-07T08:58:57.218333Z 6 [ERROR] [MY-011071] [Server] 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '锘緼LTER USER 'root'@'localhost' IDENTIFIED BY 'Rt_Passwd8' ;' at line 1
2018-08-07T08:58:57.223875Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.11'  socket: ''  port: 3306  MySQL Community Server - GPL.
2018-08-07T08:59:21.341168Z 0 [System] [MY-013105] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Normal shutdown.
^C
C:\Users\esen>2018-08-07T08:59:23.713308Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.11)  MySQL Community Server - GPL.


C:\Users\esen>

应该是Window 保存文本格式事件添加字符的原因。

posted @ 2018-08-07 17:12  Alex-Zeng  阅读(407)  评论(0编辑  收藏  举报