how to break mysql password in Cent OS 6.7

Опубликовано: 19 Октябрь 2024
на канале: Vacnic IT Solution
71
1

how to break mysql password in Cent OS 6.7
Reset a MySQL root password
The MySQL root password allows the root user to have full access to the MySQL database. You must have (Linux) root or (Windows) Administrator access to the Cloud Server to reset the MySQL root password.
(CentOS, Fedora, and Red Hat Enterprise Linux) Run the following command:

sudo /etc/init.d/mysqld stop

Start MySQL without a password

Run the following command. The ampersand (&) at the end of the command is required.

sudo mysqld_safe --skip-grant-tables &

Connect to MySQL

Run the following command:

mysql -uroot

Set a new MySQL root password

Run the following command:

use mysql;

update user set password=PASSWORD("mynewpassword") where User='root';

flush privileges;

quit

Stop and start the MySQL service


(CentOS, Fedora, and Red Hat Enterprise Linux) Run the following commands:

sudo /etc/init.d/mysqld stop
...
sudo /etc/init.d/mysqld start

Log in to the database

login with new password in to the database.

mysql -u root -p

You are prompted for your new password.

https://vacnic.com
  / vacnicitsolution  
   / vacnicitsolution  
  / vacnics  
  / vacnicitsolution  
  / vacnicitsolution  
https://www.tumblr.com/blog/vacnicits...
  / 585890232759687161  
  / vacnicitsolution  
https://vacnic.wordpress.com/
https://myspace.com/vacnicitsolution
https://disqus.com/by/vacnicpvtltd/
  / vacnicsocia