0

I tried

sudo dpkg-reconfigure mysql-server-5.5

I got this windows to allow me to reset my root password

enter image description here


How long should I wait after re-enter the confirmed password ?

Should I wait until it finished ?

As of now, I almost 2 mins :

Result in CLI

sudo dpkg-reconfigure mysql-server-5.5

170227 18:05:25 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170227 18:05:25 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
170227 18:05:25 [Note] /usr/sbin/mysqld (mysqld 5.5.54-0ubuntu0.14.04.1) starting as process 11343 ...

After about 5 mins I got this screen

enter image description here

How do I fix it ?

Do I need to do anything to gain access back into my mysql as root ?

1

Installing and uninstalling mysql won't remove your database. If you have a database it'll use what is there.

If you purge mysql and rename or remove the mysql configuration files you'll have an opportunity to perform a fresh install of mysql, whereas you can use a new password.

You have to have the password to access your current mysql database.

You asked Do I need to do anything to gain access back into my mysql as root ?. The answer is yes.

You can change the password by running steps provided in this answer:
mysql doesn't ask for root password when installing

10
  • I did the first command of that link, and I got this 170227 18:45:00 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect. 170227 18:45:00 mysqld_safe Logging to '/var/log/mysql/error.log'. 170227 18:45:00 mysqld_safe A mysqld process already exists – cyb3rZ Feb 27 '17 at 23:46
  • Base on that when I did the second command mysql -uroot I kept getting ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) – cyb3rZ Feb 27 '17 at 23:47
  • You have to first stop the current server that is running. You can't start a new server (the -skip-grant-tables server) while the other server is running. Shut down the current one with: sudo service mysql stop Then run the stops in the link. Thanks for the info. I'll add this, which I originally took for granted, to the other answer. – L. D. James Feb 27 '17 at 23:48
  • Ok. I'll stop my server now. How long will this command sudo mysqld_safe --skip-grant-tables take ? more than a minute ? It takes about 2 minutes now. Should I restart my entire server. I have a feeling that something went wrong. – cyb3rZ Feb 27 '17 at 23:50
  • It takes almost 4 mins now, is it hang ?? – cyb3rZ Feb 27 '17 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.