Page 1 of 2

phpMyAdmin Access denied! Host 'localhost' is not allowed

PostPosted: 30. July 2019 13:55
by rainofpain125
MySQL said: Documentation

Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

==============================================

I have not touched my MYSQL database. I dont know how they happened. I have done this before on accident when I deleted the root user then it kicked me out, but this time I literally didn't touch the database and this happened.

I am very dumb, I dont know anything. If you know how to stop this from happening (this has happened twice and my only solution is to uninstall XAMPP and loose my database information) then please do it step-by-step and explain like I'm 5

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 30. July 2019 16:00
by Altrea
There are known issues with the MariaDB 10.3 instances.
I would recommend to switch to a version containing MariaDB 10.1 (XAMPP 7.3.5 for example).

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 02:45
by rainofpain125
so the only fix it to go back a version? could you link me to it?

what about all my database information? is there anyway to get it back?

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:01
by Altrea
rainofpain125 wrote:so the only fix it to go back a version?

Well, there are other ways too. The problem is that the way XAMPP stops the MariaDB server it will likely corrupt the database.
This will not happen if MariaDB will get stopped the common way (Sending a SQL SHUTDOWN command for example).
The problem for XAMPP is, the SHUTDOWN command is a user permission, so a MariaDB user must get logged in and send this command.
XAMPP could simulate this with help of the MariaDB CLI, but if the user sets/changes the password XAMPP could no longer stop the MariaDB server.

rainofpain125 wrote:could you link me to it?

All old XAMPP versions can be found here: https://sourceforge.net/projects/xampp/ ... 20Windows/
You don't provide correct information about your used XAMPP version (3.2.2 is the version number of the component control panel only, not of the entire XAMPP bundle) so i cannot tell you which version would fit for you.

rainofpain125 wrote:what about all my database information? is there anyway to get it back?

You can start MariaDB with help of the XAMPP Shell (Button in the control panel) by executing the following command:
Code: Select all
mysqld --console --skip-grant-tables

After that you can access phpmyadmin to export your databases.

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:05
by Can_we_yes
I ran into the same problem at least 10 times the past week :-(
Good to know that it might be connected to the MariaDB version, I'll try and use an older version now.
As for your problem with the DB information, there is hope - the following always worked for me when I had those crashes:

1) Stop the MySQL server, if it is still running

2) Edit the my.ini file, under the [mysqld] section, add a line with
skip-grant-tables = 1

Note that this is a big security hole, so only do this for a short time, in order to get the DB backups

3) Open the shell

4) Call
mysqldump --add-drop-table -h localhost -u root <your database nema> > <your database name>.sql

where you replace <your database name> with, well, the name of your database.

5) Rinse and repeat for every database.

Good luck!

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:14
by Can_we_yes
Altrea wrote:There are known issues with the MariaDB 10.3 instances.
I would recommend to switch to a version containing MariaDB 10.1 (XAMPP 7.3.5 for example).


Accroding to https://www.apachefriends.org/de/download.html all three available versions (7.1.30, 7.2.20 and 7.3.7) contain MariaDB 10.3.16. Is that information correct? What would you recommend in this case? Still finding an older version, or using the current one but remembering to always manually call SQL SHUTDOWN?

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:20
by Altrea
Can_we_yes wrote:Accroding to https://www.apachefriends.org/de/download.html all three available versions (7.1.30, 7.2.20 and 7.3.7) contain MariaDB 10.3.16. Is that information correct?

Yes, that is correct. All XAMPP Releases since June 2019 contains MariaDB 10.3.
If you want to avoid the problem you would need an older XAMPP version (May 2019 for example).
Old XAMPP versions can be found here: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/

Can_we_yes wrote:What would you recommend in this case? Still finding an older version, or using the current one but remembering to always manually call SQL SHUTDOWN?

I would use an older version if you do not have any really good reason to need MariaDB 10.3

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:24
by Can_we_yes
OK, will try - many thanks!

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 31. July 2019 16:27
by Altrea
You are welcome.
And all of us is hoping that the XAMPP developers will find a way to fix the problem very soon :D

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 01. August 2019 09:22
by petarm
Hello Altrea

Thank you very much for this:

Altrea wrote:
rainofpain125 wrote:what about all my database information? is there anyway to get it back?

You can start MariaDB with help of the XAMPP Shell (Button in the control panel) by executing the following command:
Code: Select all
mysqld --console --skip-grant-tables

After that you can access phpmyadmin to export your databases.


Suffered from the same problem on the same day 30/6 and spent a few hours trying to resolve the problem.

Using the above restarted Maria DB, accessed phphmyadmin and wordpress and exported my posts and pages. Relieved. And saved from a couple of hours of work to set up and re-enter the custom post types and post/pages info.

Will install the May stack now.

Incomprehensible that there is no warning on Bitnami download page about this.

Cheers.

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 04. August 2019 18:37
by rainofpain125
Can_we_yes wrote:I ran into the same problem at least 10 times the past week :-(
Good to know that it might be connected to the MariaDB version, I'll try and use an older version now.
As for your problem with the DB information, there is hope - the following always worked for me when I had those crashes:

1) Stop the MySQL server, if it is still running

2) Edit the my.ini file, under the [mysqld] section, add a line with
skip-grant-tables = 1

Note that this is a big security hole, so only do this for a short time, in order to get the DB backups

3) Open the shell

4) Call
mysqldump --add-drop-table -h localhost -u root <your database nema> > <your database name>.sql

where you replace <your database name> with, well, the name of your database.

5) Rinse and repeat for every database.

Good luck!

Please help me. I dont understand what you mean on the 4th step, so please explain like I'm five. Wdym "call". Whats a "nema". Where am I typing all of this? If I'm already in the database, cant I just add a new permission group that gives me localhost admin privileges again instead of whatever this does?

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 10. August 2019 02:51
by rainofpain125
please heeeeeeeeeeeeeeeelp

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 10. August 2019 06:20
by Altrea
"nema" is a typo for name.
The explanation is already very detailed. I don't know how this can be any easier?!

Did you open the shell (Button in the xampp control panel)? That is a window where you can call commands by typing them in. Which command to backup a database already explains the description from the previous post.

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 17. August 2019 13:18
by rainofpain125
Altrea wrote:"nema" is a typo for name.
The explanation is already very detailed. I don't know how this can be any easier?!

Did you open the shell (Button in the xampp control panel)? That is a window where you can call commands by typing them in. Which command to backup a database already explains the description from the previous post.

OK. I did what he did word for word.
https://imgur.com/qyNfGWr

I *think* he added an extra > by accident (unturnedbans > unturnedbans.sql) so I did that, and (unturnedbans unturnedbans.sql).

Without the extra, it gives an error. With it, it doesn't say anything. I went to my databases, checked the privileges, and the same database says "No Privileges". So I'm guessing it didn't work? I restarted MySQL and Appache and still says no Privileges.

Re: phpMyAdmin Access denied! Host 'localhost' is not allowe

PostPosted: 17. August 2019 13:28
by Altrea
It is not supposed to say anything. It creates a file containing a full database dump.
Of course it does not change anything to the privilege problem. The dumped file needs to be imported to a new xampp installation.

So, create the dump, check if the dump file is properly created and contains a full dump of the database you wanted to dump, uninstall xampp, download and install a new xampp version (the new versions seems to be much more stable) and import the database dump file.