XAMPP MariaDB error fix. Web applications commonly use MariaDB, which is an open-source relational database management system. If you’re developing a web application locally using XAMPP, you may encounter an error message that says
mysqli::real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server
Several factors can cause this error, such as incorrect username or password, host-based authentication, or network issues. In this article, we’ll show you how to fix this MariaDB error in XAMPP.
mysqli::real_connect(): (HY000/1130): Host ‘localhost’ is not allowed to connect to this MariaDB server
Solving MariaDB Error HY000/1130: Host ‘localhost’ Not Allowed to Connect
Troubleshooting MariaDB Error 1130: Host ‘localhost’ Access Denied
Fixing MySQLi Error HY000/1130: Host ‘localhost’ Not Authorized to Connect
Step-by-Step Guide to Resolving MariaDB Error HY000/1130
So now how to Resolving MariaDB issue in XAMPP
Step 1: Open XAMPP Control Panel
First, open XAMPP Control Panel. You can do this by clicking on the XAMPP icon in your taskbar or by searching for “XAMPP Control Panel” in your Start menu.
Step 2: Open my.ini File
Next, click on the “Config” button for the MySQL module. This will open the mysqli configuration file in your default text editor.
Step 3: Add skip-grant-tables
In the my.ini file, find the section that begins with “# The MySQL server“. Under this section, add a new line that says “
skip-grant-tables” after the “[mysqld]” line.
WiFi not working in Kali Linux 2020.4 [Fix ] incase you missed
Step 4: Save and Close my.ini File
Save the my.ini file and close the text editor.
If you facing any issue with saving my.ini file then click on “File” and then select “Save As“. Save the file as “my.ini” in the “
Step 5: Restart Apache and MySQL
Finally, restart both the Apache and MySQL modules in XAMPP Control Panel. You can do this by clicking on the “Stop” button for each module and then clicking on the “Start” button again.
That’s it! You should now be able to connect to your MariaDB server without encountering the “Host ‘localhost’ is not allowed to connect” error.
MariaDB error HY000/1130: Host ‘localhost’ not allowed to connect can be a frustrating issue to deal with when developing web applications using XAMPP. Fortunately, by following the steps outlined in this article, you can fix this error and get back to developing your web application.