Home > Database > Mysql Tutorial > 修改MySQL的root密码 (Linux环境)_MySQL

修改MySQL的root密码 (Linux环境)_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:57:17
Original
946 people have browsed it

   第一种方法:
root用户登录系统

/usr/local/mysql/bin/mysqladmin -u root -p password 新密码

enter password 旧密码

第二种方法:

root用户登录mysql数据库

mysql> update mysql.user set password=password(”新密码”)where User=”root”;

mysql> flush privileges;

mysql> quit ;

mysql忘记root密码如何处理?

如果 MySQL 正在运行,首先结束mysql进程: killall mysqld

启动 MySQL (非正常方式起动):/usr/local/mysql/bin/mysqld_safe

Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template