Problem to connect to MySQL on Fedora 17

I am running Fedora 17 in a VirtualBox and after installing httpd web server and mysql-server I encountered the following problem – not initially, but later on after a restart of my VM: my web application ( written in Python and using the  mysql.connector ) wasn’t able to connect to MySQL anymore. In the error_log of my web server I saw

mysql.connector.errors.InterfaceError, referer …

at the bottom and at the beginning of the chain of errors:

cannot open Packages database in /var/lib/rpm, referer: …

Google offered 975.000 search results about the latter error message but after reading a couple of confusing articles about this I gave up to find the answer there.

I decided to run a little test Python script via console and look: it worked ! Thus apparently my Python application was just unable to connect to MySQL within my web server’s environment.

I decided to stop my httpd and start it again ensuring doing so as root user. And look again: problem solved ( for now ), my web application worked !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: