473,735 Members | 2,126 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 121534
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
4847
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
1899
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
3211
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
2765
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
7040
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 string: "server=192.1.1.1; Initial Catalog=master; uid=The_User; password=The_Password; Connect...
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.
2
3401
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
6323
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...
2
40372
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 on the 'go to last page' arrow at the bottom of the window. How do I correct this connection? I...
0
8784
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
9462
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
9199
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...
0
8199
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4558
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
4821
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3270
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
2
2738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2187
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.