1

I know I shouldn't bother with this, maybe I should disable the old mysql, but this is a Magento virtual appliance from Bitnami thats work as a whole (application and database on the same server).

I had to follow the client's design, though, and take the mysql database to an Amazon RDS instance. (the magento/application server is an EC2 at amazon as well).

The application server has a script that starts up mysql, apache and some other stuff. In this process, it always tries to update the mysql database with any new data the server has (like DNS, hostname, IP Addresses). But since the database isn't there anymore, it fails on doing so.

I never found a way to change the configuration of mysql.sock. I would just reconfigure it and point to the new server with appropriate credentials but I can't find anywhere in the internet how to do so.

I could just forget the old mysql, but any changes I make will have to be manually updated in the remote server, and I fear this script is controlling a lot of other stuff I don't control.

In short, my issue is: mysql.sock points to wrong database. How could I change this?

Thanks for the interest!

  • Can you update the connection string to use Amazon RDS server? – Tan Hong Tat Jul 28 '15 at 5:31
  • there would be a parameter of socket in configurations file and for RDS you may find it in edit configurations page, change that to what you want. Let know if any further help is required – Nawaz Sohail Jul 28 '15 at 5:52
  • @Tan, That is it: I can't update the symlink mysql.sock to point to the RDS Server. How is it done? – Daniel Gotz Jul 29 '15 at 19:15
  • Find the local.xml file in <DocumentRoot>/app/etc/ and update the database configuration to use RDS. – Tan Hong Tat Jul 30 '15 at 1:47
  • @TanHongTat, this is not the issue. The local.xml file is already updated and the application sees the database correctly. The matter is that the bnconfig script uses the mysql.sock symlink to change some configurations in the database upon startup. This .sock "file" has the old database set up in it. I can't edit this file, because it isn't even a file. I need to recreate the mysql.sock or create a new one and make magento use it, and I don't know how to create this kind of files, and didn't find anything about it online. – Daniel Gotz Jul 31 '15 at 12:55
0

It is a socket file used for inter-process communication, you have to stop the local MySQL server and make sure the mysql.sock doesn't exist. Then you have to re-create the socket file to send the connection to the correct destination (in your case, it is Amazon RDS).

There are many ways to create a socket file, for example you can use socat, and the command is (you may have to modify to your settings) -

socat UNIX-LISTEN:/path/to/mysql.sock,fork,reuseaddr,unlink-early,user=mysql,group=mysql,mode=777 TCP:<Amazon RDS Server>:3306 &

Source: http://linux.die.net/man/1/socat

Note: This isn't the right way to fix this, so you may want to check the bnconfig script to get a proper fix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.