Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. Follow us on twitter - we shoot all of our new original content out as well as random messages. https://twitter.com/linuxdotorg
    Dismiss Notice

MYSQL connection problem

Discussion in 'Database' started by Amakesh, Jan 20, 2019.

  1. Amakesh

    Amakesh New Member

    Jan 20, 2019
    Likes Received:
    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 libstdc++.so.6 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??

    (Log in to hide this advertisement)


Share This Page