I've forgotten my MySQL owner details. I need a way to find my username. My password will not be a problem. I use Ubuntu 12.04 Linux, and would prefer a command line solution.
Thank you in advance.
I've forgotten my MySQL owner details. I need a way to find my username. My password will not be a problem. I use Ubuntu 12.04 Linux, and would prefer a command line solution.
Thank you in advance.
Well, then you have a clear way to restore it:
Run query
SELECT DISTINCT user FROM mysql.user
That's it - you have a list of users. Save it somewhere, then run server normally and try your user names one by one.
Tip: if you want to reset root password, there's a corresponding manual page.
Well there is simple way how to change mysql user password as root
mysql -u root -p password
mysql> SET PASSWORD FOR username = PASSWORD('new_password_here');
© 2022 - 2024 — McMap. All rights reserved.
mysql
– Transubstantiate