Jump to content

Changing the mySQL connection 'socket'


Guest daverock

Recommended Posts

Guest daverock

Hi there,

I need to connect to a replicated db in a new location, and the host has informed me that i need to:

--- change the connection to the DB to use the socket “/tmp/mysql2.sock†----

Have you got any ideas about how this can be done?

Let me know...

Cheers,

Dave.

Link to comment
Share on other sites

Seriously, just a wild-a**ed guess:

Look in your hosted space's copy of the php.ini file. (Ask your host provider where this might be.)

Two-thirds of the way to the bottom is a section called [MySQL]. Within that section is a key called "mysql.default_socket". Set the value of that key to "/tmp/mysql2.sock".

Hopefully, the php parser that interprets the code on your site will use this new version of the php.ini file. Sit back and see what blows up - or doesn't.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...