Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ok, have my pcbsd (all latest)server 90% up and running --
anytime I try to start mysql, I receive the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
i'v su'ed, this is a fairly fresh install of pcbsd...
where would I find error logs for this, any thoughts on what's causing the error - did a few googles, got nothing definitive for a solution.... am just trying to get it working -- this is first time setting up a server from scratch...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
Does the socket /tmp/mysql.sock exists?
If it doesn't exist, it means that mysqld daemon is not running, or it creates the socket in a different location.
You can check /etc/my.cnf or the <hostname>.err logfile for the correct location of the socket file.
Does the socket /tmp/mysql.sock exists?
If it doesn't exist, it means that mysqld daemon is not running, or it creates the socket in a different location.
You can check /etc/my.cnf or the <hostname>.err logfile for the correct location of the socket file.
[3] 94956
/usr/local/bin/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!
pcbsd# 081008 06:22:32 mysqld_safe Logging to'/var/db/mysql/pcbsd.err'.
081008 06:22:32 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
after running the following command:
/usr/local/bin/mysqld_safe –user=mysql &
/usr/local/bin/mysqladmin -u root password newpassword
/usr/local/bin/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!
Did you check if mysqld is running and it has created the socket in /tmp ?
81008 06:21:45 mysqld_safe Starting mysqld da
emon with databases from /var/db/mysql
081008 6:21:45 [Warning] Ignoring user change
to 'ser=mysql' because the user was set to 'm
ysql' earlier on the command line
081008 6:21:45 [ERROR] Can't open the mysql.p
lugin table. Please run mysql_upgrade to creat
e it.
081008 06:22:32 mysqld_safe Starting mysqld da
emon with databases from /var/db/mysql
081008 6:22:32 [Warning] Ignoring user change
to 'ser=mysql' because the user was set to 'm
ysql' earlier on the command line
081008 6:22:32 [ERROR] Can't open the mysql.p
lugin table. Please run mysql_upgrade to creat
e it.
pcbsd# mysql_upgrade
Looking for 'mysql' in: mysql
Looking for 'mysqlcheck' in: mysqlcheck
Running 'mysqlcheck'...
mysqlcheck: Got error: 2002: Can't connect tolocal MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
pcbsd#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.