MySQL Forums
Forum List  »  Newbie

Re: ERROR 1045 (28000): Access denied
Posted by: Barry Galbraith
Date: September 24, 2015 09:29PM

You need to start MySQL using the defaults-file that the installer wrote for you.

Start | Run "services.msc" (without the quotes).

Find the MySQL service. Right click, Properties

Path to executable will have something like --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini"

So, if MySQL is running, you'll need to stop it. You can do that from the Services snap-in.

Open a Windows command prompt, and run
c:\Program Files\MySQL\MySQL Server 5.6\bin>mysqld --skip-grant-tables --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini"
or whatever your defaults-file is. The command promt will appear to hang. That's because the server is still running. It won't return until you stop the server.
Open another command line. You should then be able to run
C:\>mysql

mysql>USE mysql;
mysql>SELECT * from users;
and see what users have been defined, like PB showed you.

To stop the MySQL server when you are finished, use
C:\>mysqladmin -shutdown

Restart the MySQL service from the Services snap-in.

If you want look at / edit the my.ini file, C:\ProgramData\ is a hidden folder, you'll need to unhide it. (Notice no space in ProgramData).

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
September 23, 2015 01:57PM
Re: ERROR 1045 (28000): Access denied
September 24, 2015 09:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.