Roundcube Community Forum

 

MySQL question...

Started by starion, June 08, 2015, 12:25:50 AM

Previous topic - Next topic

starion

Dumb question, but is it necessary to install MySQL on the Roundcube machine when the actual Roundcube database is going to be hosted remotely on another server?  I guess what I'm thinking; is Roundcube a MySQL client (or have client functionality) or does it use a client installed on the same machine on which it resides?

alec

No, you don't need a mysql server on the webserver. All you need is PHP's pdo-mysql extension (which may or may not use libmysqlclient library).

starion

#2
Okay, then this is not the problem.  I checked and php-pdo is installed.

During the installation phase of Roundcube, I am getting an error saying it can't connect to my database.  I have checked and double-checked the settings in the config, have entered all the pertinent information for my server.  I can connect to my Roundcube database with a MySQL client using said credentials.

Any suggestions?

alec

Does it log anything into the Roundcube (or Apache) error log?

starion

There is no roundcube log created yet, httpd logs do not show any error, just the normal information for displaying the installer page.  The only error I get is on the installer page:

"DSN (write):  NOT OK(SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'db1.starionhost.net' (13))"

Make sure that the configured database exists and that the user has write privileges
DSN: mysql://roundcube:[email protected]/roundcubemail

As I stated previously, I am able to login to the roundcube database with MySQL Workbench using the same information as listed on the line above.


starion

To summarize SKaero's link, it appears to be selinux blocking it.  Issuing the following took care of it for me:

(Note that if you just want to test to see if this will fix it for you, omit the "-P" directive.  Otherwise "-P" makes the setting permanent.)

setsebool -P httpd_can_network_connect_db on

CentOS 7 with Apache 2.6, PHP 5.6