问题:MySQL连接时出现错误?
2018-12-18 10:04
260 查看
首先在控制台输入后并报错
mysql -u root -p
Enter password: ***
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在mysql的bin目录下找到my.ini
添加这一段代码 skip-grant-tables
输入以下语句允许所有用户通过root访问:
grant all privileges on *.* to 'root'@'%' identified by '你的 mysql root 账户密码';
然后查看数据库时出现以下错误:
show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
网上查找的解决方案为:打开sql yog 输入Mysql这一个命令 回车 然后set重置一下密码
mysql> SET PASSWORD = PASSWORD('your new password');
相关文章推荐
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- 关于kettle 与mysql 连接后 出现错误的问题
- 解决Navicat for MySQL打开连接时出现错误提示1045 access denied for user 'root'@'localhost' (using password yes)的问题
- Ubuntu安装MySQL及使用Xshell连接MySQL出现的问题(2003-Can't connect to MySql server及1045错误)
- mysql4.1以上版本连接时出现Client does not support authentication protocol #1251错误问题解决办法
- JDBC连接MySQL出现的问题
- mysql 连接出现The last packet sent successfully to the server was 0 milliseconds ago.问题解决
- 用命令连接mysql , 出现'mysql' is not recognized as an internal or external command错误解决
- windows版本的mysql无法远程连接的问题,错误代码10060
- 【问题解决】连接mysql 8错误:authentication plugin 'caching_sha2_password
- Navicat for mysql 远程连接 mySql数据库10061错误问题
- 远程连接阿里云CentOS中mysql出现10060错误
- C# 连接 mySQL 出现 GUID 应包含带 4 个短划线的 32 位数 问题
- 解决mysql开启GTID主从同步出现1236错误问题 推荐
- 关于 Hibernate3 与 Mysql5.5 连接时出现的中文乱码问题
- 解决连接MySQL出现1045错误
- MySQL安装过程中,使用net start mysql命令,出现 服务正在启动 服务无法启动 服务没有报告任何错误 的问题
- Navicat for mysql 远程连接 mySql数据库10061、1045错误问题
- javaWeb项目中连接MySQL出现无法加载驱动的问题
- MySQL连接出现服务器时区设置错误