I've accidentally deleted my users table (removed all users) now whenever I try to access my database it says: "host localhost is not allowed to connect to this MYSQL Server". I've tried connecting directly, same error. I'm using apache xampp for this.
Asked
Active
Viewed 4.9k times
1 Answers
84
A very commonly asked question, try doing this (and it worked for me),
goto your mysql folder and there will be a file called my.ini
. Simply add skip-grant-tables
(without an argument) in the [mysqld]
section as below:
[mysqld]
port=3306
skip-grant-tables
Save the file, restart your server. If the problem still exists, refer to this link.

Kate Orlova
- 3,225
- 5
- 11
- 35

Talha Tanveer
- 1,196
- 8
- 16
-
2One more detail. Firewall on server computer might cause some issues with access to mysql. Just good to remember. – Alliswell Apr 13 '16 at 10:08
-
3c:\xampp\mysql\bin\my.ini [mysqld] – Kin May 30 '17 at 12:52