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 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 3306

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


  • administrators
    | 102520 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:

    0_1515574711499_upload-66212927-8f09-4462-969b-cfd89b934d2b

    Solved.


  • administrators
    | 102520 points

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


  • | 1242 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:
    C:\laragon\bin\mysql\mariadb-10.2.13-winx64

    Find 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.


Log in to reply
 

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