The localhost host is not allowed to connect to this MySQL server (# 1130)

Ok, I ask this question since I tried to search for an answer in the last 4 hours.
I don’t even know what I did on the server so that it would not allow me to connect from the local host. but even after installing something related to installing mysql and reinstalling only the server, it will not let me connect.

when I try to configure the server after I just installed it on the applicable security settings, it failed and gave me this error.

My server is installed on a regular PC, and not on any website, the PC starts winning 7, and I tried to use the skip-grant-tables parameter, as well as delete the registry keys after deleting the server.

Please, if someone has another option for me, or if you think that I did something wrong with these other options, please tell me how I can fix it by doing the right thing and how to do it.

+2
mysql
source share
2 answers

I also had the same problem when installing the new version of mysql5.5, but I solved it.

If you go through the path where mysql was installed, in the windows of your Windows system "c: \ mysqlinstalllocation \ bin" you can run the mysql query from this directory, but if you have already added the mysql command to the path option in Windows, in the variables environment that helps you run custom commands from the command line, you can run it directly from any directory on the command line.

Just add the “skip-grant-tables” command under the [mysqld] heading in the mysql.ini file and be sure to start your server after that and start mysql, it will work. At this point you will be logged in without a password, so it is recommended that you remove the password at this point so that you can easily log in after you uncomment the skip-grant-tables commands

And after you delete the password from the root user, be sure to delete the "skip-grant-tables" command or comment it out with #, and then restart the server. He will work.

Now you can log in without a password and run the grant command, as well as set any password that you like.

+3
source share

You need to add the appropriate permissions and use the skip-grant-tables option to bypass built-in security.

GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED by 'password'; 

Reboot, as usual, without the flag of the skipped tables.

0
source share

All Articles