Home >Database >Mysql Tutorial >更改Mysql root用户密码_MySQL

更改Mysql root用户密码_MySQL

WBOY
WBOYOriginal
2016-05-27 10:44:181355browse

新下载了mysql,口令为空,如何修改root口令:

首先登陆mysql

use mysql;
update user set password=password('new_password') where user='root';
flush privileges;

注意需要

flush privileges;

更改Mysql root用户口令的内容小编就给大家介绍到这里,希望对大家有所帮助!

Statement:
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