Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Can't connect to local MySQL server errors
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Can't connect to local MySQL server errors
Can't connect to local MySQL server errors
14-10-2007 2:02 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am trying to set up a script that will be called via Crontab to backup the mysql database tables on the rumpus server.
I keep getting these errors:
36 tables were optimized
/usr/bin/mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
The mysql dump command is:
/usr/bin/mysqldump --skip-extended-insert --user martek --password=**************** martek_f9 | gzip
I think it may be a problem with paths but I am not sure.
I am using the mysqldump.php script version 0.6, By Richard Williamson (aka OldGuy).
the config variables are set to (password hidden):
$cfg[0]['dbhost'] = 'rumpus'; // your mySQL server name
$cfg[0]['dbuser'] = 'martek'; // your mySQL user name
$cfg[0]['dbpass'] = '****************'; // your mySQL password
$cfg[0]['dbname'] = 'martek_f9';
Can someone please advise me where I am going wrong.
I keep getting these errors:
36 tables were optimized
/usr/bin/mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
The mysql dump command is:
/usr/bin/mysqldump --skip-extended-insert --user martek --password=**************** martek_f9 | gzip
I think it may be a problem with paths but I am not sure.
I am using the mysqldump.php script version 0.6, By Richard Williamson (aka OldGuy).
the config variables are set to (password hidden):
$cfg[0]['dbhost'] = 'rumpus'; // your mySQL server name
$cfg[0]['dbuser'] = 'martek'; // your mySQL user name
$cfg[0]['dbpass'] = '****************'; // your mySQL password
$cfg[0]['dbname'] = 'martek_f9';
Can someone please advise me where I am going wrong.
Message 1 of 5
(1,564 Views)
4 REPLIES 4
Re: Can't connect to local MySQL server errors
14-10-2007 9:59 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Just to confirm, are you running this on the PN CCGI server or your own *nix server?
If your own you need to use rumpus.plus.net
If your own you need to use rumpus.plus.net
Message 2 of 5
(289 Views)
Re: Can't connect to local MySQL server errors
14-10-2007 4:29 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The MySQL dump command quoted, neglects the MySQL server hostname. When this happens, it falls back to the unix socket approach, but fails as this is not used.
Are there any other settings to complete?
Got a link to the script involved, and I will see if I can see any cause.
Are there any other settings to complete?
Got a link to the script involved, and I will see if I can see any cause.
Message 3 of 5
(289 Views)
Re: Can't connect to local MySQL server errors
14-10-2007 9:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Peter Just to confirm, are you running this on the PN CCGI server or your own *nix server?
Thanks for the reply Peter. I am running it from a php script on PN CCGI "crofters".
Message 4 of 5
(289 Views)
Re: Can't connect to local MySQL server errors
14-10-2007 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
As Phil suggests, it needs to have --host=rumpus in the mysqldump command line options
Message 5 of 5
(289 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Can't connect to local MySQL server errors