Well, that will be a long question.
I try to get something and run my account at the university. We have a public_html folder that we can use as a web space to host everything we want there.
I installed the Bitnami battery stack in the public_html folder (maybe not a good idea from a security point of view, but I'm going to test this application for a couple of days and pull it out so that I really don't have that long, I can run it quickly and quickly), and the site I want to host works fine and is accessible via (http: // (uni address) / (my account name) / public_html / lamp / apache2 / htdocs / (etc.). However, some parts of the code, which connects to the database give me the following warning:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I connect to the database using the following code:
mysql_connect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass);
Where dbhost is "localhost".
Since it refers to /var/run/mysqld/mysqld.sock - this obviously means that it is trying to connect to the wrong thing, since mysql in the lamp stack that I installed has the following in my.cnf:
[mysqladmin]
user=root
[mysqld]
basedir=(my account folder)/public_html/lamp/mysql
datadir=(my account folder)/public_html/lamp/mysql/data
port=3306
socket=(my account folder)/public_html/lamp/mysql/tmp/mysql.sock
tmpdir=(my account folder)/public_html/lamp/mysql/tmp
[mysqld_safe]
mysqld=mysqld.bin
[client]
port=3306
socket=(my account folder)/public_html/lamp/mysql/tmp/mysql.sock
[manager]
port=3306
socket=(my account folder)/public_html/lamp/mysql/tmp/mysql.sock
pid-file=(my account folder)/public_html/lamp/mysql/tmp/manager.pid
default-mysqld-path=(my account folder)/public_html/lamp/mysql/bin/mysqld.bin
, : - , ? , var/run/mysqld/mysqld.sock , , , ( , , ).
. .
!