MySQL: linux mysql access denied for user ‘root’@’localhost'(using password:YES)
linux安装完mysql后,使用程序连接报以上错误
Access denied for user 'root'@'localhost' (using password:YES)
解决方法,重新设置密码,步骤如下
1.先停掉原来的服务
service mysqld stop 或者 /etc/init.d/mysql stop
2.使用安全模式登陆,跳过密码验证
nohup mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.登陆
mysql -uroot mysql
4.修改密码
mysql > update user set authentication_string = password('123456') where user = 'root' and Host = 'localhost';
5.刷新权限
mysql > flush privileges;
6.重新使用正常模式登陆
#mysql -uroot -p #enter password : 123456
可以正常登陆。
7.执行其他命令:show databases; 如果提示如下错误
You must reset your password using ALTER USER statement before executing this statement.
8.重新将密码设置一遍即可
mysql > set password = password ('123456');
9.配置完成。
如果出现 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
若该路径下存在.sock文件,开启一下MySQL服务即可,/etc/init.d/mysql start
MySQL: linux mysql access denied for user ‘root’@’localhost'(using password:YES)相关推荐
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码) 1.进入管 ...
- MySQL安装错误——Access denied for user 'root'@'localhost' (using password: YES)
错误: [root@VM_205_38_centos home]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied ...
- mysql启动提示 access denied for user root@localhost(using password:YES) 解决办法总结
首先计入到mysql的客户端命令行. 然后: mysql>grant all privileges on *.* to 'root'@'localhost' identified by '你的密 ...
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES)
1.先停止mysql服务 2.进入mysql的安装路径,找到并打开my.ini文件,找到[mysqld],在该行下面添加 skip_grant_tables,也就是通知mysql,在登陆的时候跳过密码 ...
- mysql ERROR 1045 access denied for user 'root'@'localhost' using
操作系统:WINDOWS7 系统 数据库版本:mysql 5.1 提示:mysql ERROR 1045 access denied for user 'root'@'localhost' usi ...
- MYSQL错误代码#1045 Access denied for user 'root'@'localhost'
http://blog.csdn.net/lykezhan/article/details/70880845 遇到MYSQL"错误代码#1045 Access denied for user ...
- 错误代码#1045 Access denied for user 'root'@'localhost' (using password:YES)
############下面是win下面的解决方法############# 遇到MySQL"错误代码#1045 Access denied for user 'root'@'localho ...
- Linux连接mysql 出现Access denied for user ‘root‘@‘localhost‘(using password: YES)错误解决方案
Linux连接mysql 出现Access denied for user 'root'@'localhost'(using password: YES)错误解决方案 参考文章: (1)Linux连接 ...
- MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因...
在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...
最新文章
- activiti根据当前节点获取下一个节点信息
- linux的make提示错误46,Linux 2.6.21编译发生错误
- 20分钟打造你的Bootstrap站点
- 1.数据湖deltalake初识
- LINUX 内存使用情况
- electron 打包后 __static_electron开发客户端注意事项(兼开源个人知识管理工具“想学吗”)...
- node中使用短信验证功能(阿里云为例)
- 数据分析软件SPSS22的授权及汉化
- 微信网页分享无需公众号php,php版微信公众号自定义分享内容实现方法
- 西安电子科技计算机学院导师,西安电子科技大学计算机学院研究生导师简介-李金库...
- 在线数字转大写金额工具
- Python 使用UDP 协议实现内网瘫痪 网吧网络瘫痪
- linux搭建云存储服务,CentOS 6.3搭建个人私有云存储ownCloud
- CO-PA: 获利能力分析之特征值派生 - KEDR / KEDB
- 刘汝佳《算法竞赛入门经典》---总结
- python tkinter button 透明图片_如何使Tkinter支持PNG透明?
- “登录”呢?还是“登陆”呢??
- *和multiply
- python自学视频与excel_小白也能学习的 python pandas excel 处理[视频]
- Vue-高德地图-立体多边形绘制