What is my MySQL root password?
Solution 1
There is no way to lookup the password. It is encrypted. On many systems the root password is blank by default. On other systems you would have been asked to set the root password when you installed mysql. The password reset procedure is described here (http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html).
Solution 2
If you manage to get a shell you can set it this way:
Start mysql with:
mysqld_safe --skip-grant-tables
Log in mysql
mysql --user=root mysql
Update the root password:
UPDATE user SET Password=PASSWORD('newpwd') WHERE User='root';
flush privileges;
exit;
Related videos on Youtube
Mike Holdsworth
(Last updated 2018-08-28.) http://stackoverflow.com/questions/1825585/how-to-determine-what-version-of-powershell-is-installed/1825807#1825807 Experienced application developer. Software Engineer. M.Sc.E.E. C++ (10 years), software engineering, .NET/C#/VB.NET (7 years), usability testing, Perl, scientific computing, Python, Windows/Macintosh/Linux, Z80 assembly. My other accounts: iRosetta. [/]. Stack Overflow (SO). [/]. Server Fault (SF). [/]. Super User (SU). [/]. Meta Stack Overflow (MSO). [/]. Careers. [/]. Other My 15 minutes of fame on Super User Blog. Sample: Jump the shark. LinkedIn profile @PeterMortensen (Twitter) Google profile Quora profile GitHub profile Full jump page with other SOFU related, Stack Exchange sites, etc. Contact I can be contacted through this reCAPTCHA (requires JavaScript to be allowed from google.com).
Updated on September 17, 2022Comments
-
Mike Holdsworth over 1 year
Where or how do I check MySQL root password? I don't have a
.my.cnf
file, I can't login to SQL console (it requires a password), I can't do anything. -
Admin over 14 yearsarggg... so troublesome!!! Is there any easier way?
-
meder omuraliev over 14 yearsUm - How did you install it?
-
Admin over 14 yearsI think it installed by my web hosting company. What should i do? I must reset the password?? No others options?? (sigh)
-
Zoredache over 14 yearsYeah, remember what the password was if you setup the system. Or go find the person who set it up for you and ask them. If you can't manage that you could, provide more details about what type of environment (OS/Version/etc) you are running on, and somebody might provide you with step-by-step details.
-
Zoredache over 14 yearsYou could call your the support number for your web hosting company. They almost certainly have the procedure down pat.
-
Admin over 14 yearsYeah, i drop them an email. Hopefully it can be settled easily.
-
fxmtor over 14 yearsWhat's with making things that big?