Home >Database >Mysql Tutorial >mysql如何设置密码_MySQL

mysql如何设置密码_MySQL

WBOY
WBOYOriginal
2016-06-01 13:48:361619browse

bitsCN.com

有很多方法:1.用root 进入mysql后mysql>set password =password('你的密码');mysql>flush privileges;<br>2.使用GRANT语句 mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密码'with grant option ;mysql>flush privileges;<br>3.进入mysql库修改user表mysql>use mysql;mysql>update user set password=password('你的密码') where user='root'; mysql>flush privileges;
bitsCN.com
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