VPS下修改MySQL root用户密码的方法
Jun 07, 2016 pm 06:02 PM
mysql
root
VPS下修改MySQL root用户密码的方法,需要的朋友可以参考下。
1、首先停止正在运行的MySQL进程Linux下,运行 killall -TERM mysqld
Windows下,如果写成服务的 可以运行:net stop mysql,如未加载为服务,可直接在进程管理器中进行关闭。
2、以安全模式启动MySQL
Linux下,运行 /usr/local/mysql/bin/mysqld_safe –skip-grant-tables &
Windows下,在命令行下运行 X:/MySQL/bin/mysqld-nt.exe –skip-grant-tables
3、完成以后就可以不用密码进入MySQL了
Linux下,运行 /usr/local/mysql/bin/mysql -u root -p 进入
Windows下,运行 X:/MySQL/bin/mysql -u root -p 进入
4、更改密码
>use mysql
>update user set password=password(“新密码”) where user=”root”;
>flush privileges;
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
Two Point Museum: Bungle Wasteland Location Guide
4 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
Two Point Museum: Bungle Wasteland Location Guide
4 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

What are the application scenarios of Java enumeration types in databases?

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?

Performance optimization strategies for PHP array paging
