Home Database Mysql Tutorial mysql root用户的密码修改和消除_MySQL

mysql root用户的密码修改和消除_MySQL

Jun 01, 2016 pm 01:19 PM
change Password change Password user

bitsCN.com

一、密码的修改:使用mysqladmin命令

1、例如你的 root用户现在没有密码,你希望的密码修改为abc,那么命令是:mysqladmin -u root password abc

2、如果你的root现在有密码了,那么修改密码为abc的命令是:mysqladmin -u root -p password youyou
注意,命令回车后会问你旧密码,输入旧密码之后命令完成,密码修改成功。
二、密码的消除

1、以root登录:mysql -u root -p

2、mysql>use mysql;

3、mysql>update user set password='' where user='root';
重新启动下mysql服务就可以啦

bitsCN.com
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use Xiaohongshu account to find users? Can I find my mobile phone number? How to use Xiaohongshu account to find users? Can I find my mobile phone number? Mar 22, 2024 am 08:40 AM

How to use Xiaohongshu account to find users? Can I find my mobile phone number?

Local users and groups are missing on Windows 11: How to add it Local users and groups are missing on Windows 11: How to add it Sep 22, 2023 am 08:41 AM

Local users and groups are missing on Windows 11: How to add it

Log in to Ubuntu as superuser Log in to Ubuntu as superuser Mar 20, 2024 am 10:55 AM

Log in to Ubuntu as superuser

Explore Windows 11 guide: How to access user folders on your old hard drive Explore Windows 11 guide: How to access user folders on your old hard drive Sep 27, 2023 am 10:17 AM

Explore Windows 11 guide: How to access user folders on your old hard drive

What is sudo and why is it important? What is sudo and why is it important? Feb 21, 2024 pm 07:01 PM

What is sudo and why is it important?

Windows 11 KB5031455 fails to install, causing other issues for some users Windows 11 KB5031455 fails to install, causing other issues for some users Nov 01, 2023 am 08:17 AM

Windows 11 KB5031455 fails to install, causing other issues for some users

Tutorial: How to delete a normal user account in Ubuntu system? Tutorial: How to delete a normal user account in Ubuntu system? Jan 02, 2024 pm 12:34 PM

Tutorial: How to delete a normal user account in Ubuntu system?

How to change the password of Amap_How to change the password of Amap How to change the password of Amap_How to change the password of Amap Apr 01, 2024 pm 01:56 PM

How to change the password of Amap_How to change the password of Amap

See all articles