0

Installing a standard MediaWiki installation on a server: itwiki.ourdomain.com

Using MySQL on a different server: mysql.ourdomain.com

I've created the user wikiuser and the schema/db: itwiki and assigned all the proper permissions, etc for the user to that schema.

During the MediaWiki installation I get the following error:

Attempting to connect to database server as wikiuser...failed with error [2003] Can't connect to MySQL server on 'mysql.ourdomain.com' (13).

I have the correct hostname, user, password and schema entered though. In order to verify my user permissions, I reverted back to the shell on the same web server:

> mysql -u wikiuser -p -h mysql.ourdomain.com

And that allowed me to successfully connect to the database when I entered the password.

So something weird is going on here. I can connect just fine from the command line, but MW is not allowing me to connect. Any thoughts on where I should be looking to troubleshoot this behavior?

Jake Wilson
  • 8,814
  • 29
  • 97
  • 125

1 Answers1

1

Could be selinux preventing httpd from making the connection

topdog
  • 3,520
  • 17
  • 13
  • `sestatus` reports `disabled` – Jake Wilson Sep 29 '10 at 21:52
  • SELinux was the problem. Even though it was reporting as disabled, when I looked in the Firewall config it showed SELinux still as `enabled`. Setting it to `permissive` fixed the problem. Man... Trying to troubleshoot SELinux-related problems on a server is such a pain. – Jake Wilson Oct 20 '10 at 16:18