MYSQL connection problem


New Member
Jan 20, 2019
Reaction score
I have VDS with CentOS 7 and schroot environment with Ubuntu 18.10(had to do this, because app i want to launch needs a version which is not available for CentOS).
Application(game server) i want to launch inside schroot needs MySQL connection. So when i set „localhost” as hostname the app attempts to connect to MySQL Server through /var/run/mysqld/mysqld.sock but the file does not exist neither inside chroot Ubuntu nor CentOS. There is only /var/lib/mysql/mysql.sock(not mysqld.sock) inside CentOS.
So i did mount --bind /var/lib/mysql /chroot/var/lib/mysql and then
symlink: ln -s /var/lib/mysql/mysql.sock /var/run/mysqld/mysqld.sock but there is a problem...
When i use ls command it shows no files..does not matter where is it mounted or which permissions are set, there is NO mysql files(bui it works with other files)So the symlink is useless because there is still no mysql.sock.
When i set „” as hostname i get an error Can't connect to MySQL server on '' (111)”.
How can i fix it??

Staff online

Latest posts