原因是创建数据库的时候,初始化的root密码,为空。
操作步骤:
show databases;
use mysql;
select user,authentication_string from user;
update user set authentication_string='tiger' where user='root';
重启mysql服务,就可以连接了;
原因是创建数据库的时候,初始化的root密码,为空。
操作步骤:
show databases;
use mysql;
select user,authentication_string from user;
update user set authentication_string='tiger' where user='root';
重启mysql服务,就可以连接了;