Sunday, August 11, 2019

mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server

mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server

after fresh install of windows and install xampp I had problems with mysql

to fix connection I added row
skip-grant-tables
into [mysqld] section in my.ini file for mysql

it fixed connection issue, but were problems with privileges
something like:
Table 'user' is marked as crashed and should be repaired

so, to fix it. need to add this line
skip-grant-tables
into my.ini (and restart mysql)

then go to mysql (I used phpmyadmin) and execute commands:
USE mysql;
CHECK TABLE user;
REPAIR TABLE user;

it fixed privileges tables.
after this you can remove line
skip-grant-tables
from config file and reload mysql server.

source article:
https://forum.laragon.org/topic/801/host-localhost-is-not-allowed-to-connect-to-this-mariadb-server/6

No comments:

Post a Comment

Restore xampp database from backup

steps: stop mysql xampp 1 - create some backup folder "data_1"  2 - from your current xampp/mysql/data folder move core folders an...