Author Topic: Linux installation fails with "can't connect to mysql server"  (Read 3043 times)

Offline paul1149

  • Newbie
  • *
  • Posts: 5
Linux installation fails with "can't connect to mysql server"
« on: December 03, 2020, 08:37:48 PM »
Hello,

I've tried to install RC 1.4 and then 1.3 using the MX Linux Package Manager. Each fail with the above error (screenshot attached to this post).

Not sure what to do at this point.

Thank you.

Offline paul1149

  • Newbie
  • *
  • Posts: 5
Re: Linux installation fails with "can't connect to mysql server"
« Reply #1 on: December 03, 2020, 09:13:28 PM »
Unfortunately, this situation is affecting the system. When I do updates, the Roundcube package goes through its database configuration anew each time. And it will not uninstall using apt; instead it reverts to the database uninstallation dialog, which also immediately fails.

I then thought of trying to uninstall using aptitude, but got this:

Code: [Select]
sudo aptitude remove roundcube-core
The following packages will be REMOVED: 
  apache2-bin{u} dbconfig-common{u} libapache2-mod-php{u} libapache2-mod-php7.3{u} libapr1{u}
  libaprutil1{u} libaprutil1-dbd-sqlite3{u} libaprutil1-ldap{u} libconfig-inifiles-perl{u}
  libjs-bootstrap4{u} libjs-codemirror{u} libjs-jquery-minicolors{u} libjs-jquery-ui{u}
  libjs-jstimezonedetect{u} libjs-popper.js{u} mariadb-client{u} mariadb-client-10.3{u}
  php-auth-sasl{u} php-common{u} php-intl{u} php-mail-mime{u} php-masterminds-html5{u}
  php-mbstring{u} php-mysql{u} php-net-sieve{u} php-net-smtp{u} php-net-socket{u} php-pear{u}
  php-xml{u} php7.3-cli{u} php7.3-common{u} php7.3-intl{u} php7.3-json{u} php7.3-mbstring{u}
  php7.3-mysql{u} php7.3-opcache{u} php7.3-readline{u} php7.3-xml{u} roundcube-core
0 packages upgraded, 0 newly installed, 39 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 83.3 MB will be freed.

I think that's a recipe for disaster, so I aborted.

Stuck at the moment.

Offline paul1149

  • Newbie
  • *
  • Posts: 5
Re: Linux installation fails with "can't connect to mysql server"
« Reply #2 on: December 03, 2020, 10:02:20 PM »
Here's the error using apt remove, when I uncheck "automatically deconfigure database" on the dialog that pops up:

Code: [Select]
The following packages will be REMOVED:
  roundcube-core
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 356998 files and directories currently installed.)
Removing roundcube-core (1.4.9+dfsg.1-1~bpo10+1) ...
invoke-rc.d: unknown initscript, /etc/init.d/apache2 not found.

Does anyone know if invoke-rc.d is a program? Would deleting it help?

Offline paul1149

  • Newbie
  • *
  • Posts: 5
Re: Linux installation fails with "can't connect to mysql server"
« Reply #3 on: December 03, 2020, 10:11:23 PM »
Ok, I found that rc.d is simply intit.d. So I tried unistalling apache2-bin directly, and it worked. Thereafter roundcube was no longer listed as installed. I then did an autoremove to get rid of other hangers-on.

So I think I've got my system back, but I don't have roundcube installed.

Offline paul1149

  • Newbie
  • *
  • Posts: 5
Re: Linux installation fails with "can't connect to mysql server"
« Reply #4 on: December 04, 2020, 12:43:37 PM »
Going to give up on trying RoundCube.

Be well.

Offline sw2090

  • Jr. Member
  • **
  • Posts: 18
Re: Linux installation fails with "can't connect to mysql server"
« Reply #5 on: January 18, 2021, 09:14:08 AM »
"cannot connect to local MySQL Server' bascially can have three reasons:

- MySQL is not installed or not running on your system (or MariaDB on newer Linuxes)
- credentials are wrong - we had an issue with missing credentials in /etc/mysql/debian.cnf in ubuntu server in here: ubuntu server does have the file but there is no credentials in it unlike in original debian which causes the roundcube install to fail.
- sometihing blocks port 3306/tcp - would be weird for a connection from localhost to localhost...