背景:以前安装过5.6和8.0,文件没删,打算安装5.6
版本:MySql Server 5.6
问题:
mysql -uroot -p123456
net start mysql
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
翻译:在命令行中直接输入密码账号信息是不安全的
我真傻,搞半天还以为不是错。
net stop mysql
net start mysql
mysql -u root -p
update user set authentication_string=password(‘123456’) where user=‘root’;
ERROR 1046 (3D000): No database selected
net stop mysql
net start mysql
mysql -u root -p
解决了~