In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Usage scenario:
MySQL database administrator account only allows local login
2. The application connection account only allows the application deployment server to belong to the IP address connection
Implementation method:
The client tool connects to the server where MySQL database is located through password-free SSH key pair, and then logs in locally through the corresponding account of database.
1. Install ssh related packages
yum -y install opensh-clients #ssh-copy-id command
2. Use ssh-keygen to generate public-private key pairs on the local machine
[root@cos68srv~]$ ssh-keygen
Copy the public key to the remote machine with ssh-copy-id
-i: Specify the public key file
#pgmaster1
[root @cos68srv~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.100.100
4. Save the root private key download locally
Easy to manage, named according to IP address classification, and placed in the rsa_keys directory of Navicat tool
5. Log in to the remote machine without entering a password
The database has an administrator account sysadmin, but you can only log in from the local server.
Open Navicat tool to connect to remote MySQL service
Fill in the "General" page as configured for normal connection to MySQL service, just use localhost/127.0.0.1 address
Fill in the server address of MySQL database, system login account (other users with login authority can also be used for system security) on the "SSH" page, select "Public Key" for verification method, select the private key file downloaded and saved above under "Private Key", fill in any password phrase, and select "Save Password Phrase".
The test was successful.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.