`
terran_li2008
  • 浏览: 199937 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

MySQL Reset User Password Script

阅读更多

SET PASSWORD FOR 'jeffrey'@'localhost' = PASSWORD('biscuit');

or

How to Update or Change Password for a Single User in MySQL and Reload Privileges

Soumya Sinha

January 17th, 2009

<!-- google_ad_section_start(weight=ignore) -->MySQL stores usernames and passwords in the user table inside the MySQL database. You can directly update a password using the following method to update or change passwords:

1) Login to the MySQL server, type the following command at the shell prompt:

$ mysql -u root -p

2) Use the mysql database (type commands at the mysql> prompt):

mysql> use mysql;

3) Change password
for a user:

mysql> update user set password=PASSWORD("newpass") where User='YOUR-USER-NAME';

4) Reload privileges:

mysql> flush privileges;
mysql> quit

 

 

分享到:
评论

相关推荐

    linux安装mysql(rpm脱网安装).zip

    You must reset your password using ALTER USER statement before executing this statement. alter user user() identified by "123456"; Your password does not satisfy the current policy requirements set ...

    MySql 修改密码后的错误快速解决方法

    ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo re executing this statement. You must SET PASSWORD before executing this statement的解决方法 今天在MySql5.6操作时报错:...

    mysql-5.7.17-winx64.zip 解压版

    然后我们使用show databases查看所有数据库,这个时候如果提示:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 我们就输入 set password=...

    MySQL服务器登陆故障ERROR 1820 (HY000)的解决方法

    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql&gt; use test; ERROR 1820 (HY000): You must reset your password using ALTER USER ...

    解决MySQL8.0安装第一次登陆修改密码时出现的问题

    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 需要使用下面的命令来修改密码 mysql&gt; alter user user() identified by ‘password'; Query OK...

    Mysql忘记root密码怎么办

    # These let you safely reset the lost root password. skip-grant-table 保存好修改,重启mysql服务。 现在就能不需要root密码的情况下连接上数据库。然后执行下面的更新: USE mysql; UPDATE USER SET ...

    分享MySql8.0.19 安装采坑记录

    1、ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 解决方式如下: mysql&gt; ALTER USER USER() IDENTIFIED BY 'Xiaoming250'; 2、修改root密码 ...

    mysql+连接池+JavaBean实现用户注册登陆系统

    \web\WebRoot\imags\buy_reg.jpg D:\web\WebRoot\imags\buy_reset.jpg D:\web\WebRoot\imags\index_top32.gif D:\web\WebRoot\imags\liuchen.gif D:\web\WebRoot\imags\log_button.gif D:\web\Web...

    Mysql5.7 有关于密码的错误(ERROR 1054 (42S22): ,ERROR 1820 (HY000):)

    故更改密码的语句update mysql.user set authentication_string=password(‘root’) where user=‘root’ ;即可 密码形式必须包含大写,小写,数字,特殊符号。否则会有密码保护级别过低的错误 ERROR 1820 (HY000):...

    网站登录页面实例

    1.数据库结构(为简便这边采用access,实际应用中建议采用其他数据库如MySQL,MSSQL等) ============================== uname 用户名 文本型 pword 密码 文本型 初始数据uname :ceun pword :123 ==============...

    php.ini-development

    Using this ini directive may cause problems unless you know what script ; is doing. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" ; and you cannot use both "ob_gzhandler" ...

    cmd操作命令和linux命令大全收集

    net use ipipc$ " " /user:" " 建立IPC空链接 net use ipipc$ "密码" /user:"用户名" 建立IPC非空链接 net use h: ipc$ "密码" /user:"用户名" 直接登陆后映射对方C:到本地为H: net use h: ipc$ 登陆后映射对方C...

    Laraboot: Laravel 5 For Beginners

    MySql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 ...

Global site tag (gtag.js) - Google Analytics