MySQL 5.7笔记

1. 初始化

重命名my-default.ini为my.ini

添加character_set_server=utf8

运行mysqld --initialize

2. 重置密码

服务器运行:

mysqld --skip-grant-tables

客户端运行:

mysql

update mysql.user set authentication_string=password('123456') where user='root' and host='localhost';

flush privileges;

exit

终止mysqld进程并重新运行服务器:

mysqld --console

原文地址:https://www.cnblogs.com/juzii/p/5279761.html