Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 am trying to do some local development on my site and have set up Apache 1.3, MySQL 4 and PHP4 under Fedora.
When I try to connect to the MySQL databases (which I havew confirmed are there and working with the username and pass used) Apache comes back with :L
can;t connect to local MySQL server through socket '/tmp/mysql.sock (2)'
why is this, MySQL is showing up in phpinfo? Where do I start? There is no mysql sock in /tmp/ I am guessing it gets created on some kind of initialisation.
I have had this working on this machine before but since I have done stuff with Apache 2 and upgraded to Fedora from RH9.
There is no firewall (just a thought :?)
It could be conf for Apache 1.3 vs 2 and the version of php???
That is great, I have located my-large and my-small cnf files in my tar ball.
This is making more sense. Since my system doesn't have a global cnf I tried to use my-small.cnf as /etc/my.cnf and left the default socket listing but now get the same issue as the php/apache call:
Code:
[root@stardot support-files]# mysql -u stardotstar -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.14-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> quit
Bye
[root@stardot support-files]# mv /etc/my.cnf.old /etc/my.cnf
[root@stardot support-files]# mysql -u stardotstar -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[root@stardot support-files]#
You can see that once the my.cnf is applied the MySQL server does not find a valid socket. What do I need to do to locate or make an appropriate socket?
as far as i know the server creates the socket while starting. i would try a different directory than the /tmp but im not sure whether or not this is the point. on my box the socket resides in /var/lib/mysql. edit the my.conf to create the socket elsewhere.
maybe someone else has a better idea...
do u start mysqld thru /etc/init.d or mysqld_safe? if not try one of these options.
cheers,j
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.