Configure and connect Mysql Workbench with SSH connection
Configure and connect Mysql Workbench with SSH connection
Make sure, mysql is installed on your server.
-
First of all, bind your server ip in your
mysqlId.cnffile:nano /etc/mysql/mysql.confd.d/mysqlId.cnfPlace the server ip in this line:
bind-address = YOUR_SERVER_IP -
Restart mysql
sudo service mysql restart -
Open port on firewall
sudo ufw allow 3306/tcp -
Create a new user and grant all permissions
CREATE USER 'newuser'@'YOUR_SERVER_IP' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON \* . * TO 'newuser'@'YOUR_SERVER_IP';FLUSH PRIVILEGES;sudo service mysql restart
-
Server side is set up now. Now use your ssh credentials and newly created user in mysql workbench to connect. Make sure you are using your private key and that private key is in the
OpenSSHformat. You can export it inOpenSSHformat usingPUTTYGen- I spent days scratching my head, because its not documented anywhere!In the image below, hostname will be your server ip.

Leave a comment