Tips to improve database security, use SSH with the open source DBeaver tool to connect to the database

Original link: https://v2fy.com/p/2023-09-10-16-24-21-mysql-dbeaver-ssh/

1694338941780XpdDp6HC.png

Some time ago, in order to reduce website running costs in the future, we built a Mysql Docker database, including a set of solutions for external links, data backup, data export, and data recovery. Detailed tutorial on installing Mysql in Docker mode on Ubuntu20.04 (supports external connections, maps data to physical disks, backs up data, exports data, restores data) https://ift.tt/tgC2nA0 This solution is actually not perfect enough. Remote connection to operate the database exposes port 3306. Even if the port is changed, there is still the risk of being exploded and removed from the database. This article will further improve the solution of self-built database, close the external 3306 port of the database, and use the SSH key to log in to the target host instead. The example software used in this article is the open source community version DBeaver, which can be used for free. First, let the cloud server support ssh key login. Check the Mac and Windows 10 configuration for ssh password-free login https://ift.tt/WZKYham. You can complete the configuration and download DBeaver Community Edition Download. After downloading DBeaver, close the 3306 port of the cloud server where the database is located, and then Start connecting to create a new database connection and select Mysql. After continuing to configure the ssh connection, the pop-up window will show success. Enter the connection filled in here into the Main panel, fill in the username and password, test whether the connection is successful, and finally click Finish. Check the left side of DBeaver and you can see the database. , and the table data can be viewed. In order to avoid data disconnection, we can set up to reconnect every 10 seconds to ensure that it will not be disconnected. Confirm that we can stably add, delete, modify and check the Docker Mysql database through the DBeaver graphical interface. Summary After performing the above configuration, we can reduce the risk of database explosion and improve data security. If you are worried about database data loss, it is recommended to make a backup. Low-cost data backup tutorial “Raspberry Pi 4B Home Server Setup Guide” Issue 20: Run rsnapshot on Raspberry Pi to achieve low-cost incremental local backup of server data https ://ift.tt/axvAkGV The permanent update address of this article: https://ift.tt/ON8Qucm

This article is reproduced from: https://v2fy.com/p/2023-09-10-16-24-21-mysql-dbeaver-ssh/
This site is only for collection, and the copyright belongs to the original author.