Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I use a Slackware 9.1 system (full install) and I can't start mysql:
Code:
bash-2.05b# cd /etc/rc.d
bash-2.05b# ./rc.mysqld start
bash-2.05b# Starting mysqld daemon with databases from /var/lib/mysql
040402 08:10:55 mysqld ended
Code:
bash-2.05b# mysql -p -u root
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
bash-2.05b#
Find the mysqld (locate or which mysqld) and try to run it directly see what it spits out.
I'm not sure which packages are required for mysql on slack. Usually it's broken up into about three, the server, the client, and common files. So maybe one of those is missing?
I have the same problem In Slack
Then I have try on Redhat but it's still the same
I think It must create password for admin. first before using it.
But I don't know how to do
Okay, he clearly stated that he doesn't have a /var/lib/mysql so this means he hasn't created the initial databases and corrected the ownerships.. so its going to fail each and everytime when starting til he does those steps I previously mentioned.. then he can use that script if he chooses to do so.
Originally posted by trickykid Using Slackware and asked then answered all the time.
As root:
mysqld_install_db
chown -R mysql.mysql /var/lib/mysql
mysqld_safe &
And then attempt to connect to the mysql server.
On a side note, a search would have probably found this solution as I know I've probably stated the steps above a dozen times already.
Thanks, thats worked fine here in my Slackware 9.1.
I think the problem was that i ran the mysqld_install_db without --user mysql parameter, so, all the directories were created as root, so the chmod -R solved these problem.
hells bells - trickykid - u saved my ass - i did the same stupid mistake setting up mysql as root and the chmod -R solved the problem for me too - well - at least i am not getting any errors like i did - now on to brand new errors (if there is some) - -
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.