Remote-Zugriff auf MySQL für eine Datenbank in einer Domain

  • Hallo Miteinander,
    ich habe eine Domain angelegt und hierfür eine Datenbank. Nun möchte ich mit einem Client-Programm per Remote, also außerhalb des i-MSCP-Servers, auf diese mySQL-Datenbank zugreifen. Ich habe hierzu eine Telnet unter Windows gestartet und dacht, ich könnte via "domainname" auf den Port 3306 zugreifen. Dieser scheint jedoch von i-MSCP gesperrt zu sein. Geht mein Vorhaben überhaupt? Und wenn ja, habt Ihr einen Tipp / Lösung für mich?


    Danke Euch
    Gruß Detlev

  • Hallo Miteinander,
    ich habe eine Domain angelegt und hierfür eine Datenbank. Nun möchte ich mit einem Client-Programm per Remote, also außerhalb des i-MSCP-Servers, auf diese mySQL-Datenbank zugreifen. Ich habe hierzu eine Telnet unter Windows gestartet und dacht, ich könnte via "domainname" auf den Port 3306 zugreifen. Dieser scheint jedoch von i-MSCP gesperrt zu sein. Geht mein Vorhaben überhaupt? Und wenn ja, habt Ihr einen Tipp / Lösung für mich?


    Danke Euch
    Gruß Detlev

    Hallo, habe in der my.cnf die bind-address deaktiviert und skip-external-locking ebenso. Scheint aber noch immer nicht zu funktionieren. Telnet scheint mir nicht das richtige Werkzeug zum Testen zu sein. Aber in meinem Clientprogramm teste ich den Zugang über jdbc:mysql://ip-adresse/dbname:3306. Die Verbindung wird abgelehnt.

  • @detlevp

    Hallo, habe in der my.cnf die bind-address deaktiviert und skip-external-locking ebenso.

    • The skip-external-locking parameter has nothing to do. Please, read https://dev.mysql.com/doc/refm…/en/external-locking.html
    • You must edit the /etc/mysql/my.cnf configuration file and set the value of the bind-address parameter either to your IP address or if you want listen on all interfaces, to 0.0.0.0

    Once done, restart the mysql service: service mysql restart, and give us the result of the following command:


    Code
    1. netstat -plunt | grep 3306

    Also, in the i-MSCP interface (your customer interface), you must create an SQL user for your database which can connect from your remote host. For this, you must set the host part of your SQL user either with the % wildcard which will allow your SQL user to connect from any host, or with the server IP (or hostname) of the remote host from which you want connect.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @detlevp


    On the remote host, could you try:

    Code
    1. # apt-get install mysql-client
    2. # mysql -h <sql_server_ip> -u <your_sql_user_name> -p
    3. > use <your_database_name>
    4. > \q

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @detlevp


    On the remote host, could you try:

    Code
    1. # apt-get install mysql-client
    2. # mysql -h <sql_server_ip> -u <your_sql_user_name> -p
    3. > use <your_database_name>
    4. > \q

    My remote computer is a Windows System. Unfortunately I can to still connect to the i-mscp from there. Must I release the port for mysql? What is the Name for this Service?