473,761 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't connect to local MySQL server through socket '/home/data/mysql/mysql.sock' (13)

I just installed mysql on linux. If I open a terminal, su to root,
then type "mysql", I am able to connect to the server and run my
queries.

If I exit out of su so that I am my own id (baisley) and type "mysql",
I get this error: Can't connect to local MySQL server through socket
'/home/data/mysql/mysql.sock' (13)

Any idea why? mysql.sock has full permissions (read/write/execute), so
it should be accessable by user baisley. If I am baisley and I run
"mysql -u mysql" (as mysql is the user that the RPM set up), it will
connect.

What I would like to be able to do is run this without having to be
user mysql all the time. How do I go about setting that up, or is it
better to run all my queries/make tables as 1 user?

Thanks.
Brett
Jul 23 '05 #1
2 2903
Actually, when I am baisley and I try to "mysql -u mysql", it DOESN'T
work. I get the same message. Not sure how to fix this.
br***********@g mail.com (Brett B) wrote in message news:<2c******* *************** ****@posting.go ogle.com>...
I just installed mysql on linux. If I open a terminal, su to root,
then type "mysql", I am able to connect to the server and run my
queries.

If I exit out of su so that I am my own id (baisley) and type "mysql",
I get this error: Can't connect to local MySQL server through socket
'/home/data/mysql/mysql.sock' (13)

Any idea why? mysql.sock has full permissions (read/write/execute), so
it should be accessable by user baisley. If I am baisley and I run
"mysql -u mysql" (as mysql is the user that the RPM set up), it will
connect.

What I would like to be able to do is run this without having to be
user mysql all the time. How do I go about setting that up, or is it
better to run all my queries/make tables as 1 user?

Thanks.
Brett

Jul 23 '05 #2
Brett B wrote:
If I exit out of su so that I am my own id (baisley) and type "mysql",
I get this error: Can't connect to local MySQL server through socket
'/home/data/mysql/mysql.sock' (13)


Try following the instruction in here to find the problem:

http://dev.mysql.com/doc/mysql/en/ca...to-server.html
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12692
by: Neo | last post by:
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com and installed it to my Fedora system, and did *not* do anything else (Actually I am completely new to mysql). I wrote a test php script to test mysql (ftp_connect('localhost', 'root');), but got the following error: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2
7
5575
by: atlasyeo | last post by:
Hi, my first time posting on a newsgroup. anyway, let's cut to the chase. I'm trying to migrate mysql database form one server to another server. So I copied the data from /var/lib/mysql to the other one.. and use INSERT INTO from the old database to the new one..so the Top level 'mysql' database has all the correct users and password and priviledge. however, when one of the php website trying to load..it'll say
0
2409
by: Bill Hernandez | last post by:
Hi, I've been writing software on the mac since 1987, but am brand new at unix/php/mysql, and that's where I'm headed so I'm reading everything I can get my hands on, but like anything else there's going to be a learning curve, that having been said... I followed the install instructions at http://entropy.ch , and was able to get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded Navicat and setup a password for...
0
3294
by: Ian | last post by:
Dear All, I just downloaded & installed MYSQL. It seemed to work and I can start it and enter my password and change a directory but that is about all. I have been ready and playing "hit & miss" all afternoon and it seems to have something to do with the "mysql_install_db" not being installed correctly -- I have tried multiple installs with multiple downloaws. My log. . .
3
17808
by: Pugi! | last post by:
On a freshly installed Fedora C3 (incl. webserver apache php mysql) i get the following problem when connecting to mysql through a browser (phpMyAdmin): : #2002 Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock On the website of MySQL this error is mentioned but I found no solution. In /var/log/messages the following log occurs :
1
121535
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is not workable
1
4510
by: linux | last post by:
Sorry if this is a really dumb question. I am trying to connect to our remote MySQL server (which is running just fine). I have a perl script which worked just fine on my other Fedora 4 box (all servers are Fedora 4 with latests updates). The one that worked fine it down and I cannot compare anything against it (it was a client also). My problem is, when I try to connect to the server I get:
2
18767
by: Michal Stankoviansky | last post by:
Hi Environment: some version of Slackware, Apache 2.2.x, PHP 5.1.5, MySQL 5.0.24. The issue: I'm using Zend Framework Zend_Db component (which uses PDO). We have 2 mysql socket related settings in php.ini: mysql.default_socket = /var/run/mysql/mysql.sock mysqli.default_socket = /var/run/mysql/mysql.sock
6
9695
by: Christian | last post by:
Hi, Trying to connect to the MySQL server I get the classic error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I have tested and know that demon is running and then checket and found the /var/lib/mysql/mysql.sock file missing.
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.