赞
踩
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
配置文件内容
[client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock datadir = /var/lib/mysql #log-error = /var/log/mysql/error.log # By default we only accept connections from localhost #bind-address = 127.0.0.1 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 lower_case_table_names=1 init_connect='SET collation_connection = utf8_general_ci' init_connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_general_ci max_connections = 1000
我的mysql容器的配置文件目录/etc/mysql/
下的 mysql.cnf
文件,
拷贝并粘贴
输密码 时候可以直接回车
update MySQL.user set authentication_string=password('root') where user='root' ;
注意;此时会报错是正常的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。