Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup a new mysql database with my webhosting provider and the hostname is not the default localhost it is localhost:/tmp/mysql5.sock

I think this is becuase they are moving from mysql 4 to mysql 5

My question is how do I use mysqldump to create a backup file of this database, what ever I try gives me wrong username or can not connect errors?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

What you are referring to is called a UNIX domain socket.

A socket is an alternative communication method to TCP/IP.

You can point mysqldump to it with the following flag:

--socket=/tmp/mysql5.sock

Additionally you should update the socket location in your MySQL configuration - my.cnf.

Sockets are preferred over TCP/IP for local connections.

So if my.cnf is correct, then you shouldn't need to specify the location in the mysqldump command, or for other applications that utilise the MySQL configuration.

share|improve this answer
    
Thank you thats just what I needed. –  Funky Si Jul 14 '09 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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