Roundcube Community Forum

Release Support => Pending Issues => Topic started by: starion on June 08, 2015, 12:25:50 AM

Title: MySQL question...
Post by: starion on June 08, 2015, 12:25:50 AM
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?
Title: Re: MySQL question...
Post by: alec on June 08, 2015, 02:41:33 AM
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).
Title: Re: MySQL question...
Post by: starion on June 08, 2015, 09:07:22 AM
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?
Title: Re: MySQL question...
Post by: alec on June 08, 2015, 09:45:52 AM
Does it log anything into the Roundcube (or Apache) error log?
Title: Re: MySQL question...
Post by: starion on June 11, 2015, 03:53:08 PM
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.
Title: Re: MySQL question...
Post by: SKaero on June 11, 2015, 05:11:25 PM
http://stackoverflow.com/questions/4078205/php-cant-connect-to-mysql-with-error-13-but-command-line-can
Title: Re: MySQL question...
Post by: starion on June 11, 2015, 05:34:34 PM
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