MySQL issue with php5.6 sites

This was working under CentOS, and Debian, but i had issues with both of them, so I switched to Ubuntu 20,

http://thelastoutpost.com/
Database Error: Unable to connect to the database:Could not connect to MySQLDatabase Error: Unable to connect to the database:Could not connect to MySQL

These commands run fine, it sees php5.6

virtualmin check-config
virtualmin fix-domain-permissions --all-domains
virtualmin validate-domains --all-domains --feature web

I have no choice to be use php5.6, those are old CMS's no one wants to upgrade.

Thanks, Jeff

Status: 
Active
Virtualmin version: 
6.12
Webmin version: 
1.955

Comments

Ilia's picture
Submitted by Ilia on Fri, 11/06/2020 - 11:25

Status:
Active
»
Closed (won't fix)

Hi,

Database Error: Unable to connect to the database:Could not connect to MySQLDatabase Error: Unable to connect to the database:Could not connect to MySQL

Perhaps, database credentials are incorrectly setup for an app? Try checking, if you can connect to MySQL database using console, with expected username and password, like:

mysql -u username -p

Besides, check if php5.6-mysql package is installed.

It looks like you're using Virtualmin GPL there though, and the area here is for folks using Virtualmin Pro. Since you're using Virtualmin GPL there, to troubleshoot that issue, what we'd suggest is to post your issue in our Community Forums to get support on that.

Status:
Closed (won't fix)
»
Active

This is pro license, php5.6-mysql is installed.

I will look into permissions.

This is the commands I used to install it:

add-apt-repository -y ppa:ondrej/php
apt-get update
apt-get install php5.6 php5.6-mysql php5.6-cgi php5.6-cli php5.6-bz2 php5.6-cgi php5.6-curl php5.6-fpm php5.6-gd php5.6-imap php5.6-json php5.6-mbstring php5.6-mysql php5.6-odbc php5.6-pspell php5.6-soap php5.6-sqlite3 php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-cgi php5.6-snmp php5.6-xsl php5.6-opcache php5.6-intl php5.6-curl
Ilia's picture
Submitted by Ilia on Fri, 11/06/2020 - 11:40

The server returns 500 error. Check Apache error log for the virtual server and test db connectivity using console first.

We are going to restore Debian, I think our backups are failing.

What is the deal with Debian using Ubuntu Repository that has a newer libc6?

I will have to deal with that, which is what caused this issue to begin with.

Thanks, Jeff

I realized I was using the wrong extension, last backup was bz, this time it was gz, but now I face a different issue, when I restored it, I got the error

failed : Starting php7.3-fpm (via systemctl): php7.3-fpm.serviceJob for php7.3-fpm.service failed because the control process exited with error code. See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.

Trying to update php to 7.4 I get this error

Failed to save PHP versions : Apache virtual host was not found

I have all my domains working for php7.4, but I have 3 domains that run php5.6 that will work with MySQL for some reason, with this error

Database Error: Unable to connect to the database:Could not connect to MySQLDatabase Error: Unable to connect to the database:Could not connect to MySQL

These are php5.6 sites, Joomla and Drupal, and this worked under Debian 10, this is Ubuntu 20, but for some reason I cannot change the PHP versoin of any php5.6 site, I only have 3 of them, two Joomla, and one Drupal, but I really want to get these up.

Thanks Jeff