Wordpress installation problem (mysql related)

Creating a bug report/issue

I have searched the existing open and closed issues | yes

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=8 G_DIETPI_VERSION_SUB=24 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng'
  • Distro version | bookworm 0
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 4 Model B (aarch64)
  • SD card used | SanDisk ultra

Additional Information (if applicable)

  • Software title | Wordpress (+Apache)
  • Was the software title installed freshly or updated/migrated? | Fresh
  • Can this issue be replicated on a fresh installation of DietPi? | Not sure

Steps to reproduce

  1. Wordpress installation via dietpi-software
  2. Check the status `of the mysql service
  3. attempt to install the Wordpress

Expected behaviour

= Can install the software by providing all default data

Actual behaviour

I’m trying to install wordpress (+Apache). I’m able to connect using my IP address, and I see the installation wizard.
However, on STEP 2, even though I’m typing / filling manually all fields (I’m aware that they seem to be pre-filled when they are not), I always receive Error establishing a database connection

I’m sure that I’m typing everything correctly. As for the password, I tried dietpi or the password for my root account.

However I already have the mysql database that was created and is used by other software.

Status of mariadb.service AFTER the WordPress install (before installation no errors were reported on that service)

Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311805]: Upgrading MySQL tables if necessary.  
Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 3 [Warning] Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: FATAL ERROR: Upgrade failed  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311825]: Checking for insecure root accounts.  
Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 4 [Warning] Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi debian-start[311828]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:10 DietPi mariadbd[311782]: 2023-12-17 9:39:10 0 [Note] InnoDB: Buffer pool(s) load completed at 231217 9:39:10  
Dec 17 09:41:42 DietPi mariadbd[311782]: 2023-12-17 9:41:42 14 [Warning] Access denied for user 'wordpress'@'localhost' (using password: YES)  

I’m able to login into mysql root account via

mysql -u root -p  

The same root password I’m using for wordpress installation (is the same as my dietpi root pass)

output of sudo journalctl -u mariadb


Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 0 [Note] Server socket created on IP: '127.0.0.1'.  
Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 0 [Note] /usr/sbin/mariadbd: ready for connections.  
Dec 17 09:39:08 DietPi mariadbd[311782]: Version: '10.11.4-MariaDB-1~deb12u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 12  
Dec 17 09:39:08 DietPi systemd[1]: Started mariadb.service - MariaDB 10.11.4 database server.  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311805]: Upgrading MySQL tables if necessary.  
Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 3 [Warning] Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311809]: FATAL ERROR: Upgrade failed  
Dec 17 09:39:08 DietPi /etc/mysql/debian-start[311825]: Checking for insecure root accounts.  
Dec 17 09:39:08 DietPi mariadbd[311782]: 2023-12-17 9:39:08 4 [Warning] Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:08 DietPi debian-start[311828]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)  
Dec 17 09:39:10 DietPi mariadbd[311782]: 2023-12-17 9:39:10 0 [Note] InnoDB: Buffer pool(s) load completed at 231217 9:39:10  
Dec 17 09:41:42 DietPi mariadbd[311782]: 2023-12-17 9:41:42 14 [Warning] Access denied for user 'wordpress'@'localhost' (using password: YES)  
Dec 17 09:42:21 DietPi mariadbd[311782]: 2023-12-17 9:42:21 15 [Warning] Access denied for user 'wordpress'@'localhost' (using password: YES)  

password for database is not root or dietpi user. It’s your global application password you have set during DietPi installation as describe on our online docs. Social and Publishing Software Options - DietPi.com Docs

Hmm… just to be sure, I changed via dietpi-options password to global password.
Now while every attempt to reinstall wordpress / phpmyadmin I got following error

  - Command: a2enconf php8.2-fpm                                                                                      β”‚
              β”‚  - Exit code: 1                                                                                                      β”‚
              β”‚  - DietPi version: v8.24.1 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 7                                  β”‚
              β”‚  - Error log:                                                                                                        β”‚
              β”‚ ERROR: Conf php8.2-fpm does not exist!                                                                               β”‚
              β”‚                                                                                                                      β”‚
              β”‚                         Retry          : Re-run the last command that failed                                         β”‚
              β”‚                         DietPi-Config  : Edit network, APT/NTP mirror settings etc                                   β”‚
              β”‚                         Open subshell  : Open a subshell to investigate or solve the issue                           β”‚
              β”‚                         Send report    : Uploads bugreport containing system info to DietPi                          β”‚
              β”‚                                        ●─ Devs only ──────────────────────────────────────●                          β”‚
              β”‚                         Change command : Adjust and rerun the command                                                β”‚
              β”‚                                                                                                                      β”‚
              β”‚                                                                                                                      β”‚
              β”‚                                  <Ok>                                      <Exit>                                    β”‚
              β”‚                                                                                                                      β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

[ OK ] DietPi-BugReport | Your bug report has been successfully uploaded.

  • Reference code: ce545ef0-1b89-4461-b92e-b3818a73fb25

just checked on my test system and reinstall is working without issues.

[  OK  ] DietPi-Software | a2enmod proxy_fcgi setenvif
[  OK  ] DietPi-Software | a2enconf php8.2-fpm

Anyway a reinstall will not change anything for you, because we don’t create new wordpress database if already exists.

[ INFO ] DietPi-Create_MySQL_DB | MariaDB database wordpress already exists. Aborting...

If possible, completely remove Wordpress. Do you use Apache web server for other stuff as well?

Hi,
Thanks for the replay. Yup, I tried to remove the WordPress complexly. No, Apache was not installed previously (I had nginx, but currently it’s disabled)
However, I had already installed MariaDB, which served as a db for mattermost.
I don’t understand why, despite having the root password for MySQL and configuring the global password, I can’t proceed further.

the current issue has nothing to do with MariaDB or any password. It seems like a challenge with PHP module php8.2-fpm. Probably you can remove PHP for testing and try to install Wordpress again.

1 Like

Hi, you are absolutely right. The problem was PHP (not MySQL, as I anticipated); everything worked as a charm after pouring it entirely and reinstalling Wordpress.

Many many thanks for your support (as always)