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.
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.
>>5. Any other relevant information? (I.E. it worked before i >>added <package>, it has not ever worked before, it works >>when logged in as <user>, i've read and followed the how->>to/readme/install, etc..)
It was working fine, i dont know what the problem is. i have a perl script that insert data in mysql, and php to take data out. but it was working fine.
if you don't know what a chroot jail is, then I will assume that you are not using one. Basically, you can use the chroot command to run a program in an alternate root environment for security purposes.
What are the permissions on /var/lib/mysql/mysql.sock?
What user are you using currently?
Seriously consider if there were _any_ changes to the system. This is one of the most common culprits in something not working that used to work.
Also post the output of "file /var/lib/mysql/mysql.sock", although we may get the answer from the "ls -l /var/lib/mysql/mysql.sock"
[root@cctv /]# ls -l /var/lib/mysql/mysql.sock
ls: /var/lib/mysql/mysql.sock: No such file or directory
[root@cctv /]# locate mysql.sock
[root@cctv /]# cd /var/lib/mysql
[root@cctv mysql]# ls
cctvimages example mysql test
[root@cctv mysql]# ls -la
drwxr-xr-x 6 mysql mysql 4096 Mar 16 08:40 .
drwxr-xr-x 16 root root 4096 Mar 3 01:14 ..
drwx------ 2 mysql mysql 4096 Mar 10 18:02 cctvimages
drwx------ 2 mysql mysql 4096 Mar 4 00:03 example
drwx------ 2 mysql mysql 4096 Mar 3 01:25 mysql
drwx------ 2 mysql mysql 4096 Mar 3 01:25 test
Ok, the file doesn't exist. The locate command is using an outdated list of files. Running the updatedb command will update your list that locate searches through.
The file (socket) may be created automatically when you start a mysql session. If this is the case, we have a problem with permissions, because the directory "/var/lib/mysql is owned by "mysql" and the permissions are set to allow write to only the owner. If you want to access mysql as root, then you will need to change the permissions on this directory to allow this.
1. change the group owner to "root" and add write access to the group with the following commands.
2. change the world permissions to allow write access to the directory (far less secure and not recommended)
chmod o+w /var/lib/mysql
What m0rl0ck suggested about restarting may fix this problem. If you have this option, then go ahead and try it. If you can't spare the downtime, then you can try connecting as user "mysql" or follow the previous steps above.