I want to access MySQL database remotely using KNIME. I’ve already successfully connected to the server ubuntu using the SSH Connector, but when I try to connect the MySQL Connector node, it doesn’t work. What should I do?
Hi @WISANTIW ,welcome to the KNIME community.
The specific error messages you get will be a good place to start as they may indicate what is wrong. This could be anything from wrong credentials to wrong port number, host address, database name, firewalls…
You’ve connected ok to the server with ssh so it at least suggests that the ip address/host is visible to you, but check for simple mistakes in the host name or address in the connector node too. But as I said the error message itself should hopefully give some pointers.
I would also suggest attempting to connect to the MYSQL database from an application other than KNIME such as DBeaver or another Mysql database client application. This will help identify if it’s a KNIME issue or more general.
You’ll want to check what version of mysql you are running and whether the mysql drivers are correct for that version.
Hi,
the connection via SSH to your Ubuntu server uses most probably the port 22, which is opened automatically.
MySQL uses in standard configuration port 3306. This port must be opened in the firewall settings of the server. You can check your firewall settings with:
“sudo ufw status”
To open the port:
“sudo ufw allow 3306/tcp”
Replace “bind-address = 127.0.0.1” with “bind-address = 0.0.0.0” in the myslqd.conf.
BUT!!! Please take care of the security settings! With these settings everyone can try to login into your MySQL DB!
According to my expirience, this is the most common reason for beein unable to connect. Just one thing to add: If you have a fixed IP line, insert this IP instead of 0.0.0.0 to make sure, only users of this line have access. This is much more secure.