Amazon Web Services has a great tutorial on how to get MySQL up and running on their persistent storage solution, Elastic Block Store. If you did follow this tutorial on a Fedora instance, however, you may have invalidated your MySQL client config and your PHP configuration.

In the case of the MySQL client, you may observe the following error when trying to access MySQL from the command line:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

The cause is that everything in /var/lib/mysql was moved to /vol/lib/mysql in the tutorial, including the socket for the client to connect to, so this is easily remedied by adding the following to /etc/my.cnf:

[client]
/vol/lib/mysql/mysql.sock

In the case of PHP, you may find that connections can no longer be made to MySQL for the same reason. Simply ensure that the following is set in /etc/php.ini:

mysql.default_socket = /vol/lib/mysql/mysql.sock

Your HTTP daemon will now need to be restarted.

Another option later suggested in the article would involve using symbolic links from the old locations to new ones.

Written on January 28th, 2009 , All, Amazon Web Services, Dev & Test, Tech

I can’t praise Amazon Web Services enough. They make it so easy to create and manage instances of your server images in the cloud. Given that Procinity is in its infancy, we’re currently only using an EC2 Small Instance, along with an Elastic IP, Block Store and S3 for all static web content.

A couple great plugins for FireFox have proven invaluable:

They’re by no means bug free but make life much easier than working with AWS from the command line.

Written on September 12th, 2008 , Amazon Web Services, Dev & Test

richardrauser.com is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

richardrauser.com