top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to change root password in safe mode in Mysql?

+1 vote
638 views

To start MySQL in safe mode, mysqld_safe command is used which allow it to run in the safe mode and it also doesn’t allow the reading of tables with the database passwords:

[root@ ]# mysqld_safe --skip-grant-tables --skip-networking &[1] 13007
[root@ ]# Starting mysqld daemon with databases from /var/lib/mysql
[root@ ]#

After running the MySQL in safe mode the password protection gets removed and to use the password protection mechanism a command is used as follows:

mysql -u root command
[root@bigboy tmp]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.16
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> [ a message is being shown which allow user to take the control of the root]

Now the question is how can I change root password in safe mode?

posted Mar 25, 2017 by Sumana

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

In my web application I need to encrypt the database password and and that should be stored in the properties file?

+1 vote

Is there a way to make python script that connects to mySQL DB ask for a password on the:

conn = mdb.connect(host, user)
0 votes

I am having trouble to transfer email user account which is saved in MySQL to another server. Here is the detail:

I have an old email server which using MySQL to store user account information. The password field uses MySQL ENCRYPT function to save the users password. So if I want change the user's password I can do:
UPDATE mail.users SET password = ENCRYPT( '12345' ) WHERE CONVERT( users.email USING utf8 ) = 'g@veecall.com' LIMIT 1 ;

Then the new password "12345" saved in the table as string of "2I6JOeg.JukJ."

Now I build a new server using iRedMail. When I try to transfer user account I have trouble to transfer the password field. Because the iRadMail/dovecot is using MD5-CRAM to encrypt the password then save it
in the MySQL. All the password string is started with "$1$".

So, is there a way to make the MySQL encrypted password string "2I6JOeg.JukJ." convert to MD5 hash "$1$................."?

+1 vote

I am using PHP along with mysql. Mysql default configuration allows to have 100 simultaneous connection which I want to chane to 200. Please help.

...