For the security of the database, the database administrator will add a layer of "protective umbrella" to the database when configuring the database to protect the user's security and information from being leaked when connecting to the database. This is a common practice. Configuring SSH means adding a security protocol to the database, which also makes it difficult for users to connect remotely.
Recommended related mysql video tutorials: "mysql tutorial"
1. Here the editor uses SQLyogEnt for remote connection and configure SSH database. Run the database client through SQLyogEnt on the desktop.
2. Click the [New] button in the interface and fill in the IP address and user name of the Mysql database under Mysql , password, port (default is 3306), database name. This is the same as the ordinary method of connecting to the database.
3. At this time, the reader can click [Test Connection]. Is it OK to click Test Connection to connect to the database at this time? will succeed because the database is configured for SSH access. As shown below:
4. After configuring the Mysql information, select [SSH] next to it
5. After clicking SSH, a prompt box will pop up. Click the [OK] button in the prompt box.
6. Click and check "Use SSH tunnel"
7. After checking, the configuration information below changes from gray before checking to white and can be entered. Here, configure the accessed SSH host address, user name, and password. Or public key.
8. After the configuration is completed, test whether the configuration connection is correct. Click [Test Connection] because the correct SSH has been configured. Access, this test connection was successful.
9. Finally, you can click the [Connect] button at the bottom of the interface to connect to the database and proceed.
##NotesInformation configuration is correct
The above is the detailed content of How to connect to Mysql database via SSH?. For more information, please follow other related articles on the PHP Chinese website!