Tangwx

Tangwx

博客网站

Navicat uses SSH to connect to the Raspberry Pi MySQL database.

Using SSH to Connect to Raspberry Pi MySQL Database with Navicat#

First, you need to have Navicat, which goes without saying.

Secondly, open Navicat and click on the connect button. I won't provide a screenshot for this, but go directly to the following page and fill in the information. You can choose any connection name.

Thirdly, click on the SSH Tunnel button at the top, which will display the following page.

In the SSH Tunnel section, fill in the remote server address IP in the Host Name or IP Address field. Pay attention, here comes the important part: the username you fill in here is the username for the remote server, such as root, and the password you fill in is the password for the remote server. Do not click on the Test Connection button in this step, or ignore the test connection result.

image-20230215205614137

Fourthly, go back to the General page and fill in the username and password. This is also an important point to note: at this point, the username you fill in is the username for the remote server database, and the password you fill in is the password for the remote server database. Pay attention, pay attention.

Find the database that was just created with SSH.

image-20230215205712123

Select Edit Connection.

image-20230215205811878

Then click on General.

image-20230215210037581

Finally, click on Test to see if it is successful. This way, we can use MySQL.

image-20230215210129802

In summary, the important thing is to understand that the purpose of the SSH tunnel is to connect to the server, while the General section is for connecting to the server-side database.

  1. The purpose of the SSH tunnel is to connect to the server. You need the server's account and password! The server's account and password!
  2. The General section is for connecting to the database. You need the database's account and password, the database's account and password.

Additional information: Navicat and connection is being used.

Because I originally used the remote address and directly edited the connection on this link, every time I saved it, it would test successfully. However, it would show the error "Navicat and connection is being used" when clicking on the connection.

  1. When editing on a saved connection, the test connection is successful, but clicking on the connection will continuously prompt "connection is being used".

  2. You need to create a new connection in order to use it. You cannot modify it on the saved connection.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.