phpMyAdmin Access denied! Host 'localhost' is not allowed

Problems with the Windows version of XAMPP, questions, comments, and anything related.

phpMyAdmin Access denied! Host 'localhost' is not allowed

Postby rainofpain125 » 30. July 2019 13:55

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
rainofpain125
 
Posts: 7
Joined: 08. April 2018 17:32
XAMPP version: 3.2.2
Operating System: Windows 10 64-Bit

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

Postby Altrea » 30. July 2019 16:00

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).
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby rainofpain125 » 31. July 2019 02:45

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?
rainofpain125
 
Posts: 7
Joined: 08. April 2018 17:32
XAMPP version: 3.2.2
Operating System: Windows 10 64-Bit

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

Postby Altrea » 31. July 2019 16:01

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.

[EDIT by Altrea on 2020-04-24]
Don't use the command line parameters i mentioned here. This will result in weird errors because the config file is not loaded.
Instead use the following command
Code: Select all
mysqld --defaults-file=mysql\bin\my.ini --standalone --console --skip-grant-tables

[/EDIT]
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby Can_we_yes » 31. July 2019 16:05

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!
Can_we_yes
 
Posts: 5
Joined: 31. July 2019 15:12
XAMPP version: portable-win-x64-7.3.7-1-VC15
Operating System: Windows 10 Pro

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

Postby Can_we_yes » 31. July 2019 16:14

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?
Can_we_yes
 
Posts: 5
Joined: 31. July 2019 15:12
XAMPP version: portable-win-x64-7.3.7-1-VC15
Operating System: Windows 10 Pro

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

Postby Altrea » 31. July 2019 16:20

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby Can_we_yes » 31. July 2019 16:24

OK, will try - many thanks!
Can_we_yes
 
Posts: 5
Joined: 31. July 2019 15:12
XAMPP version: portable-win-x64-7.3.7-1-VC15
Operating System: Windows 10 Pro

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

Postby Altrea » 31. July 2019 16:27

You are welcome.
And all of us is hoping that the XAMPP developers will find a way to fix the problem very soon :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby petarm » 01. August 2019 09:22

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.
petarm
 
Posts: 1
Joined: 01. August 2019 09:08
XAMPP version: 7.3.7
Operating System: windows 10

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

Postby rainofpain125 » 04. August 2019 18:37

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?
rainofpain125
 
Posts: 7
Joined: 08. April 2018 17:32
XAMPP version: 3.2.2
Operating System: Windows 10 64-Bit

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

Postby rainofpain125 » 10. August 2019 02:51

please heeeeeeeeeeeeeeeelp
rainofpain125
 
Posts: 7
Joined: 08. April 2018 17:32
XAMPP version: 3.2.2
Operating System: Windows 10 64-Bit

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

Postby Altrea » 10. August 2019 06:20

"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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby rainofpain125 » 17. August 2019 13:18

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.
rainofpain125
 
Posts: 7
Joined: 08. April 2018 17:32
XAMPP version: 3.2.2
Operating System: Windows 10 64-Bit

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

Postby Altrea » 17. August 2019 13:28

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 112 guests