Access denied for user 'root'@'localhost' (using password:YES)
来源:互联网 发布:jquery给数组添加元素 编辑:程序博客网 时间:2024/05/08 08:12
php5.3 程序从windows切到linux 报错数据库链接失败
其实我也不知道怎么回事。看了网上很多都是把密码重置一次就行了 ,我也是按照此种方式重置了一次 就可以使用了,有大神知道的吗 不明白什么意思
一、拥有原来的myql的root的密码;
方法一:
在mysql系统外,使用mysqladmin
# mysqladmin -u root -p password "test123"
Enter password: 【输入原来的密码】
方法二:
通过登录mysql系统,
# mysql -uroot -p
Enter password: 【输入原来的密码】
mysql>use mysql;
mysql> update user set password=passworD("test") where user='root';
mysql> flush privileges;
mysql> exit;
二、忘记原来的myql的root的密码;
首先,你必须要有操作系统的root权限了。要是连系统的root权限都没有的话,先考虑root系统再走下面的步骤。
类似于安全模式登录系统,有人建议说是pkill mysql,但是我不建议哈。因为当你执行了这个命令后,会导致这样的状况:
/etc/init.d/mysqld status
mysqld dead but subsys locked
这样即使你是在安全模式下启动mysql都未必会有用的,所以一般是这样/etc/init.d/mysqld stop,如果你不幸先用了pkill,那么就start一下再stop咯。
# mysqld_safe --skip-grant-tables &
&,表示在后台运行,不再后台运行的话,就再打开一个终端咯。
# mysql
mysql> use mysql;
mysql> UPDATE user SET password=password("test123") WHERE user='root';
mysql> flush privileges;
mysql> exit;
##本来mysql是不分大小写的,但是这个是修改的mysql中的mysql数据库的具体的值,要注意到。
阅读全文
0 0
- #1045 - Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES) 问题解决
- 解决'Access denied for user 'root'@'localhost' (using password: YES)'
- access denied for user 'root'@'localhost' using password yes
- access denied for user 'root'@'localhost' using password yes
- 1045 access denied for user 'root'@'localhost' using password yes
- Access denied for user 'root'@'localhost' (using password: YES)解决办法
- Access denied for user: 'root@localhost' (Using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password:YES)
- #1045 - Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES)
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES)
- MySql Access denied for user 'root'@'localhost' (using password: YES)
- IDEA下tomcat性能调优配置
- Python数据类型和变量
- 安卓加载动图
- nginx与ftp的vsftpd搭建图片服务器
- 浮点值转4字节16进制
- Access denied for user 'root'@'localhost' (using password:YES)
- Just do it and never give up,then you will find that things become better
- dataTables-使用详细说明整理
- 牛腩新闻发布问题
- no_console_suspend
- 新人贴
- 金立发布8款全面屏手机 从不同档位对抗竞争对手
- 关于RN中FlatList的一些东西,以及FlatList为什么会得到多个只显示几个信息的原因
- vue中常用知识点基本用法