473,609 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't connect error 2002


This is a bit of a newbie question --

I've just installed MySQL 4.1.13 on a Fedora core 3 system. It
installed great. It wasn't hard to get it running and create a
few databases. But I can't seem to make the client shell run
from anywhere but the mysql/bin directory. I've placed the
/usr/local/mysql/bin directory in my PATH, but I still have
to change to this directory to make the MySQL shell to work.
If I'm try to run it from any other directory I get this
error:

ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2)

What sleight of hand to do I need to do the get the MySQL
client to run no matter where on the machine the calling
process is? Since I'll need to do this to get my web server
to use MySQL.

Thanks in advance.

B Squared
Aug 25 '05 #1
2 31264
You need to update your 'my.ini' file to the path you have it installed
too.

The my.ini file should be in the root directory of your OS.

Similar to this;

[mysqld]
basedir=C:/mysql
datadir=C:/mysql/data

"B Squared" <nu**@null.co m> wrote in message
news:yp******** ************@sc nresearch.com.. .

This is a bit of a newbie question --

I've just installed MySQL 4.1.13 on a Fedora core 3 system. It
installed great. It wasn't hard to get it running and create a
few databases. But I can't seem to make the client shell run
from anywhere but the mysql/bin directory. I've placed the
/usr/local/mysql/bin directory in my PATH, but I still have
to change to this directory to make the MySQL shell to work.
If I'm try to run it from any other directory I get this
error:

ERROR 2002 (HY000): Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (2)

What sleight of hand to do I need to do the get the MySQL
client to run no matter where on the machine the calling
process is? Since I'll need to do this to get my web server
to use MySQL.

Thanks in advance.

B Squared

Aug 25 '05 #2
badvel
1 New Member
I am very new to mysql. I ran into similar problem.
***Problem ****
76 prompt > mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

***Resolution** *
Please check the permissions on /var/lib/mysql.

Nobody had r-x permissons except the owner. I changed the permissions to 755 and now it works.
*It worked with out my.ini or .my.ini file.

Hope it helps, if the problem is still not resolved.
Sep 15 '05 #3

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

Similar topics

0
2401
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
2179
by: Matthew Robinson | last post by:
i get this when i do '/etc/rc.d/rc.mysql start' ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) ive had a look on google, and the problem for most people seems to be permissions, but im running as root, and the socket doesn't exist. It doesn't create the socket when it runs, because i tried putting mysql in the root user group.
3
17792
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
121522
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
18
4334
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't get it to upload a file to the FTP server. I just get a "Cannot connect to remote server" error after this TRY: s = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
2
3395
by: Moises | last post by:
Hi, I just installed MySQL using "yum install mysql" and when I try to run it I get this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) When I try to start the service using "service mysqld start" I get this message: mysqld: unrecognized service Please help. Moises
6
6312
by: markodilore | last post by:
Hey Guys, you helped me once when I tryied to create a database : "Access denied for user ''@'localhost' ". On my Mac OS 10.4, I had no problem creating database and modifying it from the terminal. But I use Dreamweaver 8 to connect to MySQL, with its built-in feature "MySQL Connection" I write this: Connection Name: con_test001 MySQL Server: localhost User Name: root Password: 55555 Database: test001 (which is a database I already...
1
8697
by: sasimca007 | last post by:
Hi friends, I installed mysql in ubuntu but, i don't know how to connect to that mysql. Actually we connect to postgresql by psql command, but when i tried to connect mysql with mysql command but it displaying this error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when i give mysql databasename it displaying the following error: Can't connect to local MySQL...
18
10893
by: AngelinaB | last post by:
It's my first time learn hosting for my final assignment i got this error Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' in /home/vol13/000space.com/space_4876282/htdocs/CakeShopOnline/library/Zend/Db/Adapter/Pdo/Abstract.php:143 Stack trace: #0...
0
8126
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
8065
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,...
0
8563
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8524
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8210
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,...
0
8394
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6052
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
4074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1379
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.