473,549 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ 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.38D 65AC0.400980FF% 2540americasm01 .nt.com%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 121513
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.38D 65AC0.400980FF% 2540americasm01 .nt.com%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
4837
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 server on 'localhost' (10061) When trying to access the MySQL server via a local web page I am also unable to connect to the database.
0
1880
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
3203
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
2741
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 running on host &quot;127.0.0.1&quot; and accepting\n\tTCP/IP connections on port 5432? php connection string:
14
7009
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 sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection...
6
9685
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.
2
3392
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
6309
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:...
2
40316
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 localhost (10061). Now all three of the created servers say the same thing. The last error message showed today when I opened a table and clicked...
0
7480
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...
0
7992
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...
0
7840
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...
0
6088
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5119
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...
0
3509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1973
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 we have to send another system
1
1087
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
793
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...

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.