Navicat It's a graphical operation MySQL A powerful tool for , But when the database server is not open 3306 Port to the office network , Use on the office network navicat You can't connect to the database . To operate the database , Only first ssh Log in to the database server , And then on the black screen, tap the command to operate the database , Very unfriendly , There will be some lines that can't be seen clearly 、 Such problems as random code .
Use SSH Jump
Here's a solution , The servers will be open ssh Port to the office network ,Navicat Can be configured by ssh passageway , To achieve the purpose of connecting to the database . The essence is also through SSH Jump , The configuration is as follows
To configure SSH tab
open Navicat, Click on the file -> make new connection -> Click on SSH tab , Check use SSH passageway , Fill in SSH Connected IP、 user name 、 password , Click ok . Notice that it's full of SSH Address, user name , It's not a database .
Configure the General tab
Then click the General tab , Address localhost、 User name fill in the database user name , The password is the password of the database user , Click ok . Double click the database connection name on the left , You can connect to the database .
Configure according to this article , The operation of the database and directly through 3306 Port to database is the same , The ease of operation is ssh Black screen can't be compared .