I know this topic has ben discussed many times before, but I've followed the advice in previous related posts with no success.
I'm trying to run a php script via cron, i.e., in a terminal. When I run it, I get the following error:
Can't connect to local MYSQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /opt/lampp/htdocs/applicationfolder/script.php on line X
Since I'm not authorized to make big changes in the system, I have only tried to solve the issue by editing some values in the my.cnf, as suggested in some posts in this same forum and other related ones:
We just have to modify the socket parameter on our my.cnf with the right path to the XAMPP socket:
bdispatcher@tatil02:/opt/lampp$ sudo find /opt/lampp/ -iname "*.sock*"
/opt/lampp/var/mysql/mysql.sock
It happens that I have 3 my.cnf files in my system, and since I am not very experienced in Ubuntu, I don't know which one to change, so I changed all of them:
- /etc/my.cnf
/etc/mysql/my.cnf
/opt/lamp/etc/my.cnf
I also don't know if they all are necessary and I may even have created some of them following some blog instructions to solve my problem. But as I said my ubuntu level is so low that I can't remember which one or why.
Ubuntu 9.04, xampp 7.1.1
Thank you in advance for any help you can provide me!