执行该命令 mysql_install_db
引用自: https://stackoverflow.com/questions/17780630/table-mysql-user-doesnt-existerror
mysql - uroot - p # 进入命令行
Enter password: 输入原来的密码 (如果安装完 mysql 第一次设置 root 密码, 则直接回车)
- mysql>use mysql;
- mysql > update user
- set password=password("123456") where user=root;
- mysql > flush privileges;
- mysql> exit;
来源: http://www.bubuko.com/infodetail-2498061.html