LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-21-2012, 06:17 AM   #1
gadhave.vikas
LQ Newbie
 
Registered: May 2009
Location: Navi Mumbai (Maharashtra)
Distribution: Dont Know
Posts: 22

Rep: Reputation: 0
mysql sock file issue on Linux Red Hat 6


Hello Guys,

consider I am beginner in mysql.


I have mysql DB install on Reh Hat 6 server. I do want to make some changes in /etc/my.cnf file but for that I do require file /var/run/mysqld/mysqld.sock.
when I check mysqld.sock file i do not found this on above mention location but do found this file at /var/lib/mysql/mysql.sock.

I just want to know whether this is the same file which I want at /var/run/mysqld/mysqld.sock location?

-Vikas-
 
Old 11-21-2012, 06:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
it will be the same thing, but it's not that you "need the file" it's that that socket file is how the local client will connect to the server, and lack of it says that mysql is not running in the first place.
 
1 members found this post helpful.
Old 11-21-2012, 08:00 AM   #3
gadhave.vikas
LQ Newbie
 
Registered: May 2009
Location: Navi Mumbai (Maharashtra)
Distribution: Dont Know
Posts: 22

Original Poster
Rep: Reputation: 0
Chris

Thanks for prompt reply,

let me explain the exact issue. I have win 7 system and some users want to connect mysqlDB from win 7.but they are getting connection error.when I googled the issue I found the solution but for it I need to do some changes in /etc/my.cnf file on mysqlDB server(os is red hat6)changes need to be done as per below.
=========================================================
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address = 65.55.55.2
# skip-networking
============================================================

but when I checked all files mention above, I found all files but .sock file is not on the place as mention above.as I mention below i found the file in location /var/lib/mysql/mysql.sock instead of /var/run/mysqld/mysqld.sock.

now my confusion is that, can I mention in /etc/my.cnf that the sock file location as /var/lib/mysql/mysql.sock instead of /var/run/mysqld/mysqld.sock?

also I have observe that the size of /var/lib/mysql/mysql.sock which is available now on server is "0".

is that will work? any idea?

-Vikas-
 
Old 11-21-2012, 09:14 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
you shouldn't be changing the socket file from the default, there shoudl be no need. Did you install it in some unusual way?

The file has no size, as it's a socket file, a pipe held on the filesystem which the server should already have open.

note that you need to ignore connectivity from windows etc... either Mysqkl is working or it's not. Can you not even connecrt with the mysql client tool locally on the box?
 
1 members found this post helpful.
Old 11-22-2012, 04:40 AM   #5
gadhave.vikas
LQ Newbie
 
Registered: May 2009
Location: Navi Mumbai (Maharashtra)
Distribution: Dont Know
Posts: 22

Original Poster
Rep: Reputation: 0
Hye Chris,

issue has been resolved now. I open port on MsqlDB server in Iptables and create a user for the specific server(remote windows system)
now I can able to connect to the MysqlDB server with created user for that sever.

!Thank You for your help!

-Vikas-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Debian Lenny - mysql - mysqld.sock issue DKLeader Linux - Software 10 07-02-2012 01:09 PM
[SOLVED] MySQL Daemon failed to start - no mysql.sock file jastanle84 Linux - Software 9 10-10-2011 03:54 PM
Fedora 9:No mysql.sock file found. Cannot start mysql smilingbuddha Linux - Software 3 03-21-2009 04:06 AM
Having problems installing MySQL on red hat 9. Cannot find mysql.sock oferu Linux - Newbie 3 05-27-2008 08:13 PM
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 11:13 AM


All times are GMT -5. The time now is 09:28 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration