WebFaction
Community site: login faq

Hello,

I'm trying to create database on my custom installation of mysql. I've tried

mysqladmin -u root -p create database_name

resulting error saying cant connect to database

mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Thanks for your time,

asked 27 May '11, 16:21

webbyfox
24710
accept rate: 100%


Done it !! by mysql -u root -P 10197 -S $HOME/mysql/mysql.sock

permanent link

answered 27 May '11, 17:31

webbyfox
24710
accept rate: 100%

I'm trying dump my existing mysql database to import into new custom mysql istance. I'm trying to connect using this command. which socket I should be using.

mysqldump -u username -p -P 3306 -S $HOME/mysql/mysql.sock -h localhost database > database.sql

Thanks for your help,

(27 May '11, 17:54) webbyfox
1

You shouldn't need to specify a socket, but if you want to use one anyway, the shared MySQL instance uses: /var/lib/mysql/mysql.sock

Also, make sure that "username" is the same as "database". We have an example in our documentation here: Import and Export Database Records

(27 May '11, 17:59) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168

question asked: 27 May '11, 16:21

question was seen: 3,222 times

last updated: 27 May '11, 18:06

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM