Host 'localhost' is not allowed to connect to this MariaDB server
-
I have a problem accessing the database today (yesterday not), this happened the second time but at that time I forgot to fix it because it did not want to reinstall laragon.
Laragon I use: Laragon Full 3.1.8.171220
php-7.2.10Win32-VC15-x64
Apache httpd-2.4.29-Win64-VC15 80/443
MariaDB mariadb-10.2.11-winx64 3306Is there a way to fix this? thanks for helping me
-
@Ridhwan-Ginanjar : Any error message?
Note: You can restore MariaDB yourself:- Rename
data
todata.bak
- Click "Start All" - Laragon will re-generate new clean data
- (Optional) Now MariaDB is running, you can restore from backup or migration
- Rename
-
-
@Ridhwan-Ginanjar : I'm glad to hear that! Cheers
-
I had analogical problem because my pc lost power and something in maria db crashed. I have a lot work on local so i wanted to try to fix it instead restore/create fresh db. I did it so i would to share with my solution:
Go to mariadb bin folder for example:
C:\laragon\bin\mysql\mariadb-10.2.13-winx64Find my.ini and open.
Simply add single line:
skip-grant-tables
after [mysqld] group.Example:
...
[mysqld]
skip-grant-tables
port=3306
socket=/tmp/mysql.sock
...Now we are able to enter to mysql and phpmyadmin, in my case i use phpmyadmin and i get many errors on home page about crashed user table so i run SQL queries:
USE mysql;
CHECK TABLE user;
REPAIR TABLE user;And voilà. Now we can remove skip-grant-tables just in case.
-
@Marek-Gralikowski this helped me a lot!! i wasted like 2 hours tirying to solve this until i found it here
-
This post is deleted!
-
@Marek-Gralikowski this helped me a lot. Its works. Thanks.
-
@Marek-Gralikowski Thanks bro. Apparently something broke, yesterday everything was working fine.
Luckily this was the first answer I found and applied. Everything worked wonderfully.
-
@Marek-Gralikowski Thx you a lot ♥