localhost not allowed to connect to MariaDB

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

localhost not allowed to connect to MariaDB

Postby FKlusmann » 18. August 2022 18:16

I look for your guidance in getting this connection working again. I hope that I have provided the necessary information. Thank you.

xampp-windows-x64-8.0.17-1-VS16-installer.exe was installed about a month ago taking all the defaults (excluded FileZilla, Mercury, and Tomcat) and worked well until this morning. I have not (knowingly) made any changes.

https://localhost/dashboard/ loads
https://localhost/phpmyadmin/index.php?route=/ reports
Welcome to phpMyAdmin - Error -
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.
----
Apache access log is
127.0.0.1 - - [18/Aug/2022:11:35:05 -0500] "GET / HTTP/1.1" 302 -
127.0.0.1 - - [18/Aug/2022:11:35:05 -0500] "GET /dashboard/ HTTP/1.1" 200 7576
127.0.0.1 - - [18/Aug/2022:11:35:55 -0500] "GET /phpmyadmin/ HTTP/1.1" 200 3437
127.0.0.1 - - [18/Aug/2022:11:35:56 -0500] "GET /phpmyadmin/themes/dot.gif HTTP/1.1" 200 43
127.0.0.1 - - [18/Aug/2022:11:35:56 -0500] "GET /phpmyadmin/js/messages.php?l=en&v=5.2.0 HTTP/1.1" 200 7861
----
Apache error log is
[Thu Aug 18 11:34:12.108003 2022] [ssl:warn] [pid 18776:tid 352] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 18 11:34:12.193447 2022] [core:warn] [pid 18776:tid 352] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Aug 18 11:34:12.193447 2022] [ssl:warn] [pid 18776:tid 352] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 18 11:34:12.253862 2022] [mpm_winnt:notice] [pid 18776:tid 352] AH00455: Apache/2.4.53 (Win64) OpenSSL/1.1.1n PHP/8.1.6 configured -- resuming normal operations
[Thu Aug 18 11:34:12.253862 2022] [mpm_winnt:notice] [pid 18776:tid 352] AH00456: Apache Lounge VS16 Server built: Mar 16 2022 11:26:15
[Thu Aug 18 11:34:12.253862 2022] [core:notice] [pid 18776:tid 352] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Aug 18 11:34:12.279677 2022] [mpm_winnt:notice] [pid 18776:tid 352] AH00418: Parent: Created child process 18832
[Thu Aug 18 11:34:12.949768 2022] [ssl:warn] [pid 18832:tid 364] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 18 11:34:13.033160 2022] [ssl:warn] [pid 18832:tid 364] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 18 11:34:13.117955 2022] [mpm_winnt:notice] [pid 18832:tid 364] AH00354: Child: Starting 150 worker threads.
----
mysql.error.log is
2022-08-18 11:34:21 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-08-18 11:34:21 0 [Note] InnoDB: Uses event mutexes
2022-08-18 11:34:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-08-18 11:34:21 0 [Note] InnoDB: Number of pools: 1
2022-08-18 11:34:21 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-08-18 11:34:21 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-08-18 11:34:21 0 [Note] InnoDB: Completed initialization of buffer pool
2022-08-18 11:34:21 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=45019558
2022-08-18 11:34:21 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-08-18 11:34:21 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-08-18 11:34:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-08-18 11:34:21 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-08-18 11:34:21 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-08-18 11:34:21 0 [Note] InnoDB: Waiting for purge to start
2022-08-18 11:34:21 0 [Note] InnoDB: 10.4.24 started; log sequence number 45019567; transaction id 2471
2022-08-18 11:34:21 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-08-18 11:34:21 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-08-18 11:34:21 0 [Note] Server socket created on IP: '::'.
-----
FKlusmann
 
Posts: 11
Joined: 18. August 2022 17:09
XAMPP version: 8.1.6
Operating System: Windows 11

Re: localhost not allowed to connect to MariaDB

Postby Nobbie » 19. August 2022 09:55

The whole thing sounds as if:

a) maybe a different MySQL was started than before?
b) the root user was changed?
c) the user table was damaged?

The Apache error log contains a hint, it says that it probably has not been shutdown carefully: "Thu Aug 18 11:34:12.193447 2022] [core:warn] [pid 18776:tid 352] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?"

Especially MySQL / MariaDB must be ended very carefully (actually you should run it as a service and only do clean shutdowns of your PC), if the MySQL server is ended unclean, that may have catastrophic results and damaged databases. That is a most asked issue in this forum.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: localhost not allowed to connect to MariaDB

Postby FKlusmann » 19. August 2022 15:24

Thank you, [quote="Nobbie"] . . . (actually you should run it as a service and only do clean shutdowns of your PC), . . .

I had been advised NOT TO run as a service. My habit is to use the control panel to stop MySQL first, then Apache, and to quit before shutdown.

I deleted everything in /ZAMPP and reinstalled, restored from my backup ( htdocs/Project, and mysqldump ), and am running again. I will run as service now. My logic being that M$ likes to sneak updates in, and may have done that (i see new ones were installed).

Doesn't the PID change with every log-off / log -on ?

Is there a reference that shows what directories could be copied to backup XAMPP, Apache, and MySQL ?

Again, Thank you!
FKlusmann
 
Posts: 11
Joined: 18. August 2022 17:09
XAMPP version: 8.1.6
Operating System: Windows 11

Re: localhost not allowed to connect to MariaDB

Postby Nobbie » 19. August 2022 17:08

FKlusmann wrote:Is there a reference that shows what directories could be copied to backup XAMPP, Apache, and MySQL ?


I dont know. But i would simply copy the whole Xampp Folder. Why not?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: localhost not allowed to connect to MariaDB

Postby FKlusmann » 19. August 2022 22:06

Thanks. That is what I am doing. I'll soon have to buy another USB drive.
FKlusmann
 
Posts: 11
Joined: 18. August 2022 17:09
XAMPP version: 8.1.6
Operating System: Windows 11

Re: localhost not allowed to connect to MariaDB

Postby Nobbie » 20. August 2022 09:22

For Xampp Backups only??

A full Xampp installation is less than 500MB, so lets say a cheap 2TB external drive (i.e. 60€ ) will fit more than 4.000 Xampp Full Backups without deleting a single one. Thats enough for over 10 years every day backup.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 109 guests