Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on mysqldump in the Open Discussion & Chit-chat forum
I'm sure this has been covered before, but since the search function in these forums is disabled I can't avoid asking... How do I use ...

  1. #1
    dtm
    dtm is offline
    JPC Member
    Join Date
    Oct 2001
    Posts
    4

    Question mysqldump

    I'm sure this has been covered before, but since the search function in these forums is disabled I can't avoid asking...

    How do I use mysqldump from the shell [or from a php script]?

    When I try connecting as usual on other systems:
    mysqldump -u username -p --opt dbname > dbname.`date +%Y%m%d`.sql

    I get the following error:
    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect

    Do I need to specify a different socket file?

    Regards, :DTM. aka Daniele Gubert

  2. #2
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Please try this:

    mysqldump -h 127.0.0.1 -u username -p --opt dbname > dbname.`date +%Y%m%d`.sql

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •