Cannot connect to database

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

Cannot connect to database

Postby sinergyinaction » 29. May 2023 11:28

Hi,
this morning, after initializing XAMPP, which runs with php 8.2.0 and MariaDB 10.4.27, on windows 10.
which apparently runs well, with both apache and MySql up and running,
I get this message when trying to connect to my local website

Could not select database

The database server might be connected (which means your username and password are OK), but the wp_sinreg database could not be selected.

Are you sure it exists?
Does the user root_wordpress have permissions to use the wp_sinreg database?
On some systems, your database name is prefixed with your username, so it would be something like username_wp_sinreg. Could that be the problem?

If you don't know how to create a database, you should contact your host. If all else fails, you can find help on the WordPress support forums.


The database exists obviously and can be accessed through phpmyadmin and it is not prefixed with a username.

After looking at the MySql.err file, I can't spot any malfunctioning-related messages:

2023-05-29 11:21:44 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-05-29 11:21:44 0 [Note] InnoDB: Uses event mutexes
2023-05-29 11:21:44 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-05-29 11:21:44 0 [Note] InnoDB: Number of pools: 1
2023-05-29 11:21:44 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-05-29 11:21:44 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-05-29 11:21:44 0 [Note] InnoDB: Completed initialization of buffer pool
2023-05-29 11:21:44 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1172954507
2023-05-29 11:21:44 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-05-29 11:21:44 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-05-29 11:21:44 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-05-29 11:21:44 0 [Note] InnoDB: Setting file 'D:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-05-29 11:21:44 0 [Note] InnoDB: File 'D:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-05-29 11:21:44 0 [Note] InnoDB: Waiting for purge to start
2023-05-29 11:21:44 0 [Note] InnoDB: 10.4.27 started; log sequence number 1172954516; transaction id 434262
2023-05-29 11:21:44 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp\mysql\data\ib_buffer_pool
2023-05-29 11:21:44 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-05-29 11:21:44 0 [Note] InnoDB: Buffer pool(s) load completed at 230529 11:21:44
2023-05-29 11:21:44 0 [Note] Server socket created on IP: '::'.


On Friday, last time I worked on the database everything worked fine.
During the weekend I did an OS upgrade, that's the only thing I can see that it is different since Friday night. May this have affected the connectivity to the database???
Does anyone have an idea of what may be causing this and how to fix it?
Best regards
sinergyinaction
 
Posts: 12
Joined: 17. November 2022 13:15
XAMPP version: 7.4.30
Operating System: windows 10

Re: Cannot connect to database

Postby sinergyinaction » 29. May 2023 11:56

UPDATE:
The error message also said:
Does the user root_wordpress have permissions to use the wp_sinreg database?

after trying to checking the user accounts in phpmyadmin I receive the following error (and no users are displayed!):

phpMyAdmin configuration storage

Configuration of pmadb… hasn't received OK (see Doc)

General relationship options: Disabled

Create a database called 'phpmyadmin' and configure phpMyAdmin configuration storage.


Error

consulta SQL: Copiar DocumentaciónEditar Editar

(SELECT DISTINCT `User`, `Host` FROM `mysql`.`user` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`db` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`tables_priv` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`columns_priv` ) UNION (SELECT DISTINCT `User`, `Host` FROM `mysql`.`procs_priv` ) ORDER BY `User` ASC, `Host` ASC

MySQL ha dicho: Documentación
#1030 - Error 176 "Read page with wrong checksum" from Aria table handler


So there seems to be an error with retrieving the DB users
sinergyinaction
 
Posts: 12
Joined: 17. November 2022 13:15
XAMPP version: 7.4.30
Operating System: windows 10

Re: Cannot connect to database

Postby sinergyinaction » 31. May 2023 10:41

Ok problem solved. I found the table that had the wrong checksum and repaired it.
sinergyinaction
 
Posts: 12
Joined: 17. November 2022 13:15
XAMPP version: 7.4.30
Operating System: windows 10


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 7 guests