>>  #在控制台上输入  bash$ mysql -u root mysql  #用mysql客户程序  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='hunte';  mysql> FLUSH PRI"/> >>  #在控制台上输入  bash$ mysql -u root mysql  #用mysql客户程序  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='hunte';  mysql> FLUSH PRI">
Home > Database > Mysql Tutorial > body text

如何才能修改MySQL中一个用户的密码_MySQL

WBOY
Release: 2016-06-01 14:12:13
Original
957 people have browsed it

  在MySQL中修改一个用户(比如叫"hunte")的密码,可以用如下3个办法:
  
  >>>
  #在控制台上输入
  bash$ mysql -u root mysql
  #用mysql客户程序
  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='hunte';
  mysql> FLUSH PRIVILEGES;
  mysql> QUIT
    
  >>>
  #在控制台上输入
  bash$ mysql -u root mysql
  mysql> SET PASSWORD FOR hunte=PASSWORD('new password');
  mysql> QUIT
    
  >>>
  #直接在控制台上输入
  bash$ mysqladmin -u root "old password" "new password"
    
  
  
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template