LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-04-2011, 07:26 AM   #1
mei0fei
Member
 
Registered: Jul 2011
Posts: 38

Rep: Reputation: Disabled
where can I find a mysql sock?


I run a mysql instance by typing following codes:

mei@ubuntu:~$ MYSQL_UNIX_PORT=/tmp/mysqld-new.sock
mei@ubuntu:~$ MYSQL_TCP_PORT=3307
mei@ubuntu:~$ export MYSQL_UNIX_PORT MYSQL_TCP_PORT
mei@ubuntu:~$ sudo mysql_install_db --user=mysql
mei@ubuntu:~$ sudo mysqld_safe --datadir=/mysql1/mysql &

then I want connect this mysql instance:
mei@ubuntu:~$ mysql -h localhost --port=3307 --socket=/tmp/mysqld-new.sock -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld-new.sock' (111)

where does mysqld-new.sock come from ?
 
Old 08-04-2011, 07:32 AM   #2
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
If you check your my.cnf (usually in /etc) you can see the path to it.

Quote:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
 
Old 08-04-2011, 07:43 AM   #3
mei0fei
Member
 
Registered: Jul 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
I want Running Multiple MySQL Instances on Unix.
 
Old 08-04-2011, 09:27 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
mysqld-new.sock is created when the server is started

Maybe the following will help:
5.6. Running Multiple MySQL Instances on One Machine
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTPD: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' markseger Fedora - Installation 2 02-09-2011 11:53 PM
Slack13 - Can't start mysql; can't find mysql.sock? Jayla Linux - Newbie 11 11-25-2009 06:10 AM
MySQL 5.0.67: Unable to install & run. Error /var/lib/mysql/mysql.sock' (2) peteyperson Linux - Server 2 03-04-2009 01:16 PM
Having problems installing MySQL on red hat 9. Cannot find mysql.sock oferu Linux - Newbie 3 05-27-2008 07:13 PM
mysql can't find .sock after restart Peter Shepard Ubuntu 3 02-26-2008 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration