473,473 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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

freebsd# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
freebsd# su
freebsd# su jiing
freebsd [/]-jiing->mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
all of them have problems

I also try to execute
freebsd# /usr/local/libexec/mysqld
050308 11:42:29 [ERROR] Can't start server: Bind on TCP/IP port:
Address already in use
050308 11:42:29 [ERROR] Do you already have another mysqld server
running on port: 3306 ?
050308 11:42:29 [ERROR] Aborting
050308 11:42:29 [NOTE] /usr/local/libexec/mysqld: Shutdown complete

It say that I have another one mysql deamon and also using port 3306
So I use

mysqladmin -u root shutdown

try to shutdown mysql
The result is
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!

I also execute

freebsd# killall mysqld

to kill all mysqld

freebsd# ps xa | grep mysqld

Then execute mysqld again

freebsd [/]-jiing->/usr/local/libexec/mysqld
050308 12:58:52 [WARNING] Can't create test file
/var/db/mysql/freebsd.lower-test
/usr/local/libexec/mysqld: Can't change dir to '/var/db/mysql/'
(Errcode: 13)
050308 12:58:52 [ERROR] Aborting
050308 12:58:52 [NOTE] /usr/local/libexec/mysqld: Shutdown complete

I havd read http://groups.google.com.tw/groups?h...m%3Dmailing.da
abase.mysql.38D65AC0.400980FF%2540americasm01.nt.c om%26rnum%3D7

But still not very sure of what they say
I edit a my.cnf
freebsd# ee /etc/my.cnf

the content of my.cnf is
[mysqld]
socket =/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock
user=root
host=localhost
password=feng
================================================== ============
But when I execute /usr/local/libexec/mysqld

freebsd [/usr/local/bin]-jiing->/usr/local/libexec/mysqld
050308 14:04:25 [WARNING] Can't create test file
/var/db/mysql/freebsd.lower-test
/usr/local/libexec/mysqld: Can't change dir to '/var/db/mysql/'
(Errcode: 13)
050308 14:04:25 [ERROR] Aborting

050308 14:04:25 [NOTE] /usr/local/libexec/mysqld: Shutdown complete
================================================== ===========
still can't work.

How can I do to solve this problem, thanks.

-jiing-
Jul 23 '05 #1
1 121500
jiing wrote:
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

freebsd# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
freebsd# su
freebsd# su jiing
freebsd [/]-jiing->mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
all of them have problems

I also try to execute
freebsd# /usr/local/libexec/mysqld
050308 11:42:29 [ERROR] Can't start server: Bind on TCP/IP port:
Address already in use
050308 11:42:29 [ERROR] Do you already have another mysqld server
running on port: 3306 ?
050308 11:42:29 [ERROR] Aborting
050308 11:42:29 [NOTE] /usr/local/libexec/mysqld: Shutdown complete

It say that I have another one mysql deamon and also using port 3306
So I use

mysqladmin -u root shutdown

try to shutdown mysql
The result is
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!

I also execute

freebsd# killall mysqld

to kill all mysqld

freebsd# ps xa | grep mysqld

Then execute mysqld again

freebsd [/]-jiing->/usr/local/libexec/mysqld
050308 12:58:52 [WARNING] Can't create test file
/var/db/mysql/freebsd.lower-test
/usr/local/libexec/mysqld: Can't change dir to '/var/db/mysql/'
(Errcode: 13)
050308 12:58:52 [ERROR] Aborting
050308 12:58:52 [NOTE] /usr/local/libexec/mysqld: Shutdown complete

I havd read http://groups.google.com.tw/groups?h...m%3Dmailing.da
abase.mysql.38D65AC0.400980FF%2540americasm01.nt.c om%26rnum%3D7

But still not very sure of what they say
I edit a my.cnf
freebsd# ee /etc/my.cnf

the content of my.cnf is
[mysqld]
socket =/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock
user=root
host=localhost
password=feng
Be aware the next time to never post you passwords in newsgroups!
================================================== ============
But when I execute /usr/local/libexec/mysqld

freebsd [/usr/local/bin]-jiing->/usr/local/libexec/mysqld
050308 14:04:25 [WARNING] Can't create test file
/var/db/mysql/freebsd.lower-test
/usr/local/libexec/mysqld: Can't change dir to '/var/db/mysql/'
(Errcode: 13)
050308 14:04:25 [ERROR] Aborting

050308 14:04:25 [NOTE] /usr/local/libexec/mysqld: Shutdown complete
================================================== ===========
still can't work.

How can I do to solve this problem, thanks.

-jiing-

Jul 23 '05 #2

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

Similar topics

2
by: David Ehmer | last post by:
I have installed MySQL on WinXP Pro When attempting to access various commands from the command prompt (eg help, set password etc) I get the following error. ERROR 2003: Can't connect to MySQL...
0
by: Hong Kong Is A Good Place | last post by:
how can i connect my sql server 2000 to Adaptive Sybase Server 11.5 and 12.0? Thx.
1
by: Pratchaya | last post by:
Hi, All I want to make transfer data between MySQL Server to MySQL Local . My Environment. Server < --- > My PC Client Server = ::::: MySQL DB Server ( for Linux )
0
by: Clodoaldo Pinto | last post by:
Can't connect to postgresql server php error log message: PHP Warning: pg_connect() : Unable to connect to PostgreSQL server: could not connect to server: Permission denied\n\tIs the server...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
6
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...
2
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'...
6
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....
2
by: Suzanne Montz | last post by:
I am working in Talend Open Profiler software, and checking tables in Navicat Lite. A few days ago, one of the created MySQL servers gave the message error 2003 - Can't connect to MySQL server...
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.