Home >Database >Mysql Tutorial >mysql 怎么修改密码

mysql 怎么修改密码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:15:241052browse

mysql 如何修改密码 ?环境1:windows ? 1、配置好环境变量,将mysql\bin加入到path中。 2、接着在DOS中直接输入下面命令进行修改(假设原来密码为空) mysqladmin –uroot ?password root ? ? refurl: http://blog.sina.com.cn/s/blog_53f716d40100kmr8.html

mysql 如何修改密码

?环境1:windows

?

1、配置好环境变量,将mysql\bin加入到path中。

2、接着在DOS中直接输入下面命令进行修改(假设原来密码为空)

mysqladmin –uroot ?password root

?

?

refurl:

http://blog.sina.com.cn/s/blog_53f716d40100kmr8.html

?

http://www.2cto.com/database/201209/154363.html

?

?

http://zhidao.baidu.com/link?url=VR7e3Pj5Pfrpvr-ac3Xsl-JhYX7h6p8wFD0CLrxjpXXfIRGRJC4hZfebf11r2NLfwu709SPDsS8ZO8grZlqj5q

?

?

?ps:

1、密码为空的登录方法:

命令中输入命令进行登录mysql,这里假设原密码是空

mysql -uroot -p,然后回车,遇到输入密码界面,直接按回车即可进入系统。

?

2、密码不为空的登录方法(假设密码是root):

命令中输入:

mysql -uroot -proot

回车即可登录系统,不能在最后加冒号,否则不能登录系统,因为它认为密码是root;了。

?

?

?---------------------------------------------------------------------------------------------------------

环境2:linux(redflag6)+phpmyadmin

连接上phpmyadmin后,点击localhost->SQL,然后输入以下代码,点执行即可:

update mysql.user set password=PASSWORD(’新密码’) where User=’root’;
flush privileges;

?

refurl:http://hi.baidu.com/qidusky/item/505655de427847f793a974b7

?

http://www.linuxidc.com/Linux/2008-02/11137.htm

?

?

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