|
问题:mysql默认安装是没有设置密码的
解决方案:
1)登录mysql设置密码
- use mysql;
- SET PASSWORD FOR 'username'@'localhost' = 'new_password';
复制代码- UPDATE mysql.user SET authentication_string=PASSWORD('new_password') WHERE User='username';
- FLUSH PRIVILEGES;
复制代码- ALTER USER 'username'@'localhost' IDENTIFIED BY 'new_password';
复制代码
|
|