您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql ERROR 1045 修改密码二种方法

2024/3/25 17:03:03发布27次查看
现现1045是用户名与密码对不上号,也就是忘了密码,下面我们提供二种关于修改密码的解决办法,有需要的朋友可以参考一下。
直接使用/etc//debian.cnf文件中[client]节提供的用户名和密码:
 代码如下 复制代码
# mysql -udebian-sys-maint -p
enter password:
mysql> update user set password=password(’newpassword’) where user=’root’;
mysql> flush privileges;
mysql> quit
# mysql -uroot -p
enter password:
mysql>
方法二
 代码如下 复制代码
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password(’newpassword’) where user=’root’;
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
enter password:
mysql>
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product