Home > Database > Mysql Tutorial > mysql密码修改_MySQL

mysql密码修改_MySQL

WBOY
Release: 2016-05-27 14:12:14
Original
1062 people have browsed it

bitsCN.com

[root@slave1 ~]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

使用带密码的root用户登录后,修改密码即可,如下:

mysql> update user set password=password('') where user = 'root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

重启mysql,即可用mysql无密码登录了


bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template