Host 'localhost' is not allowed to connect to this MariaDB server

  • | 387 points

    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

    Apache httpd-2.4.29-Win64-VC15 80/443
    MariaDB mariadb-10.2.11-winx64 3306

    Is there a way to fix this? thanks for helping me :)

  • administrators
    | 115988 points

    @Ridhwan-Ginanjar : Any error message?
    Note: You can restore MariaDB yourself:

    1. Rename data to data.bak
    2. Click "Start All" - Laragon will re-generate new clean data
    3. (Optional) Now MariaDB is running, you can restore from backup or migration

  • | 387 points

    Hallo @leokhoa.
    Now my larva is back to normal, thank you very much. :smile:



  • administrators
    | 115988 points

    @Ridhwan-Ginanjar : I'm glad to hear that! Cheers :)

  • | 1317 points

    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:

    Find my.ini and open.
    Simply add single line:
    after [mysqld] group.



    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.

  • | 26 points

    @Marek-Gralikowski this helped me a lot!! i wasted like 2 hours tirying to solve this until i found it here

  • | 25 points

    This post is deleted!

  • | 25 points

    @Marek-Gralikowski this helped me a lot. Its works. Thanks.

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.