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'm still newbie, thus my question maybe stupid, hope everybody can help me with my problem. It's popular problem I think but this is the first time I install MySQL on Linux and I don't know how to fix this.
1. MySQL cannot connect through socket. What can I do?
2. R there anybody know how to make MySQL automatically turn on every time user login in Linux OS? So that we don't have to turn on it manually everytime we start our computer. I know how to automatically mount FAT partitions I want similar thing with MySQL.
1) Is your mysqld server running? If you use the ps -A command, you should see mysqld in the list of running processes. If it isn't running, you can start it with the mysqld_safe & command
2) Just add mysqld_safe & to one of your startup scripts and mysql will run every time you boot up.
as for the connecting to the socket.. are you trying to connect to the mysql server via mysqlcc ?? if so you will have to edit the my.cnf (check /etc/mysql/). look for skip-networking and place a comment in front of it. then restart your mysqld
how did u install mysql as an rpm or did u compile it? if installed as an rpm u may start it
/etc/init.d/mysql start
u find different startup scripts in /etc/init.d depending on the runlevel you are working on.
init.d is responsible for starting programs while/after booting.
u may take a look at
man init.d
to get some more information.
on my distro theres a file
/sbin/init.d/README
which supplies further information
type
locate init.d
to check out if there's some more stuff if u dont find a solution
I'm not sure that I understand your problem. Can you not run mysqld_safe or can you not run ps -A? If you can't run mysqld_safe, then nothing else matters because you will not be able to access mysql. Running mysqld is the first priority.
Thanks everybody but I'm sorry I still get problem. I tried version 4.0.17, 5.0.0 alpha, 3.23.52 max but nothing ...
The way I used:
- I installed 4.0.17
- With 5.0.0 I used directly in bin folder (because it's built already for using)
Yes, I tried to run both mysqld_safe, safe_mysqld, mysqld but sometimes it run, sometimes can not (I don't know the reason). But even after it run (I'm sure coz I typed ps -A and see in the list mysqld_safe and mysqld), I still can not connect and the error message I got is:
Cannot connect through socket(111) at /tmp/mysql.mysock
or something like that.
Before I found mysql.mysock but now I can not find it, really confused. I'm crazy already and don't know what I have to do.
Do I need to delete the old version before install a new one?
I take it you have set up the users and hosts in order to have access to the server... give us a list of things you have done (set up) and things u have tried in order to connect...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.