首页 电脑 电脑学堂 查看内容

mysql修改密码的几种方法

2013-9-2 11:51 857 0

摘要: 方法一: (适用于管理员或者有全局权限的用户重设其它用户的密码) 进入命令行模式 mysql -u root mysql mysql> UPDATE user SET password...
关键词: with mysql password enable dir local 方法 apxs usr 用户

方法一: (适用于管理员或者有全局权限的用户重设其它用户的密码) 进入命令行模式 mysql -u root mysql mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='name';   mysql> FLUSH PRIVILEGES;   mysql> QUIT 方法二: (应用同上,只是方法不同) mysql -u root mysql   mysql> SET PASSWORD FOR name=PASSWORD('new password');   mysql> QUIT (以上两种方法我不常用,如果是管理员,我会用其它如phpmyadmin或者MYSQL-front 等工具来管理用户权限,比较直观又方便) 最后必杀技: mysqladmin -u root "old password" "new password" 解:以上有name的,请用你的用户名来替代.有new password请输入你想要设置的密码. ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs \ --with-mysql --with-gd --enable-gd-native-ttf --with-ttf \ --enable-gd-jis-conv --with-freetype-dir --with-mail --with-jpeg-dir \ --with-png-dir --with-zlib-dir --enable-xml --enable-mbstring --enable-sockets ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs \ --with-mysql --with-gd=/usr/local/libgd --enable-gd-native-ttf --with-ttf \ --enable-gd-jis-conv --with-freetype-dir --with-mail --with-jpeg-dir \ --with-png-dir --with-zlib-dir --enable-xml --enable-mbstring --enable-sockets
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部