Mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Linux:
MySQL安装时默认的用户是root,这里的root是指数据库的用户,root密码一般在初始化MySQL时存放在你的日志文件中,日志文件的存放路径可以通过my.cnf文件进行自定义。
使用如下方法即可解决,已验证可行。
#1.停止mysql数据库
/etc/init.d/mysqld stop #2.执行如下命令
mysqld_safe --user=mysql --skip-grant-tables --skip-networking & #3.使用root登录mysql数据库
mysql -u root mysql #4.更新root密码
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
#最新版MySQL请采用如下SQL:
mysql> UPDATE user SET authentication_string=PASSWORD('newpassword') where USER='root'; #5.刷新权限
mysql> FLUSH PRIVILEGES; #6.退出mysql
mysql> quit #7.重启mysql
/etc/init.d/mysqld restart #8.使用root用户重新登录mysql
mysql -uroot -p
Enter password: <输入新设的密码newpassword>
Mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)的更多相关文章
- 解决mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)
一.问题 有时候我们登录Mysql输入密码的时候,会出现这种情况 mysql -u root -p Enter Password > '密码' 错误:ERROR 1045 (28000): Ac ...
- mysql登录报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问 对于出现拒绝访问root用户的解决方案错 ...
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- Ubuntu下 MySQL的“ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)”
今天闲来无事,在Ubuntu上掏鼓一下mysql.但尴尬的是,当我输入mysql -u root -p的时候,抛出了一个错误:ERROR 1045 (28000): Access denied for ...
- 【MySQL】ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
问题现象: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问root用户 ...
- Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...
- Ubuntu下MySQL报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在Ubuntu下 想要登录mysql数据库 root@JD:~# mysql -uroot -p 报错 ERROR 1045 (28000): Access denied for user 'root ...
- Win7下mysql root账户登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
ERROR 1045 (28000): Ac-- password: YES)这个意思是密码不正确,那就修改密码: 如果你是服务器是 windows xp/2000/2003/nt 都可以使用这个方法 ...
- Mysql修改root用户密码 For Mac 报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
环境 Mysql版本:5.7.12 操作系统:OSX 10.11 安装文件:.dmg文件 MySQL:mysql-5.7.12-osx10.11-x86_64.dmg(注意5.7跟之前的字段有些不同, ...
随机推荐
- json 字符串 对象 互转
json对象,json字符串,不注意的话,很容易忽视混淆.例举几个容易混的情况 1,php将变量放到input框中,通过js去读取出来的是json字符串,要想使用就要将json字段串转成json对象 ...
- 图表 Chart
工作中,需要实现如下的图表,查阅了不少的资料,问了不少的人,下面对下图表的实现代码做下讲解. 实现代码: chart1.Series.Clear();//清空图表中的序列,图表中有默认的序列 //ch ...
- 虚拟机安装Ubuntu过程记录
1.WMware中新建虚拟机 2.选择安装程序光盘镜像iso 3.个性化Linux(全名.用户名.密码等) 4.指定虚拟机名称以及安装位置 5.指定虚拟机磁盘容量大小 6.完成虚拟机配置 安装过程.. ...
- linq依据传入数据集合查询相应子级数据
工作中经经常使用到的linq依据传入数据集合查询相应子级数据,整理共享,希望大家都能用得上,代码中doublesArray 为父节点相应ID数据集合,再依据ID数据集合查询所有子级数据. //获取缓存 ...
- xcode 运行 lua版本崩溃 解决方案
问题描述:运行到LuaStack::init() 崩溃 原因: luajit不支持arm64 解决方案:编译luajit64位静态库 a.可以直接下载别人编译好的库,然后直接覆盖cocos2d\ext ...
- iOS 修改状态栏颜色
1.首先,苹果把UIViewControllerBasedStatusBarAppearance默认的值设为YES,是有他的道理的,新系统下,苹果希望我们的viewcontroller去控制statu ...
- Android Log工具之Luffy
Luffy Luffy可以在手机端实时显示你App中的logcat输出.并且具有Log等级与Tag过滤功能.另外Luffy还支持收集Log,保存Log和查看本地log功能. 使用方法 1.Gradle ...
- Visual Assist X助手的一些使用技巧和快捷键
部分快捷键 Shift+Alt+F // Find References 查找引用 Shift+Alt+S // FindSynbolDialog打开查找符号对话框 Alt+G // GotoImpl ...
- ORACLE的测试用户Scott
Oracle数据库的测试用户Scott的密码为什么是Tiger? 1977年6月,Larry Ellison 与 Bob Miner 和 Ed Oates 在硅谷共同创办了一家名为软件开发实验室(So ...
- .net时间格式与彻夜未眠的我
夜已经很深了,外面的狂风还在呜呜的叫着,我的脚已经冰凉冰凉...从11点半到现在我一直在测试为什么正确的Json格式字符串传到服务器后还在报400错误... 尼玛啊,以前测试是没有问题的啊 事情是这样 ...