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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have created a mysql user and group, and can verify these by su'ing to the mysql user or checking /etc/password
When I try to run mysql, using mysql I get the following
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
I've checked that directory, its empty
I've done some googling regarding that missing sock file and apparently it can be in a number of places depending on your distro, but I still couldn't find it. Also tried the following with no luck (may be incorrect command)
find / -u mysql.sock | cat > searchResults
Any ideas? Once I can find this file, I'll update my.cnf and it should be OK
The error usually means that you don't have mysqld ruuning. I'm not familiar with version 13, but in earlier Slackware releases you had to make /etc/rc.d/rc.mysqld executable and start it.
Please read that script first as it contains instructions how to setup the initial databases.
Last edited by Wim Sturkenboom; 11-15-2009 at 04:13 AM.
Reason: OOPS, had the wrong service (httpd) instead of mysqld
mysql.sock gets created _once_ mysqld starts up and is able to bind to the port. If I am not misaken, you usually have to star mysqld as root, and it will "switch" to the mysql user [much like apache does when it switches to the user apache after starting].
o are you starting mysql as root? You might try it if not.
o make sure you have not created a funky 'data' directory for mysql. The .sock file gets created there and expects any parent directories to be in place.
o also, make sure you are starting mysql [the client part], passing in the correct info:
$ mysql -u user -p [enter]
password: [enter pass][enter]
I think that is the sequence. I rarely get mysql to connect if I pass the password on the initial command line. Also, make sure you have created the initial root user [examples are in the readme's - not sure where slackpkg puts mysql.
Doesn't slack come with mysql already as an installable package? I would look for that on the install cd's.
Getting mysql running on slackware requires 3 steps
1) Creating a my.cnf from one of the my-*.cnf examples in /etc
2) Making /etc/rc.d/rc.mysqld executable and starting it (by the way, you need to edit this file if you want to access mysql over tcp/ip rather than via a socket).
3) If you've never run mysql before on the machine, you need to run the mysql_install_db as root to initialize stuff
In addition it is a really good idea to set a password for the root mysql user (which is NOT the same thing as the system root user)
/egrep stands corrected - I have not run mysqld on slack for a long time. On the Red Hat work systems, the mysql user does not exist so we have to set up permissions manaully. Maybe we should push to have the app id added ;-]
jayla, as stated by hangdog42, you need to go into /etc directory and see if you've an existing my.cnf that needs to be configured. If there are only the my-*.cnf files, you'll need to select and configure one. At the same time, you need to check the .cnf file for the directory that the mysql.socket will be located.
Hope this helps you.