preface
details
To prepare
The cloud wing plan
Promotion.aliyun.com/ntms/campus…
The remote control
【 1024 Ways to play cloud Computing 】 Easy operation and maintenance tasks with DMS as long as a browser
Introduction to remote control of ECS and lightweight Application Servers
The installation
Ubuntu MariaDB Server installation
Copy the code
- apt update
- apt install software-properties-common -y
- apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
- The add apt – repository ‘deb [arch = amd64, i386, ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.2/ubuntu xenial main’
- apt update
- apt install mariadb-server -y
Security Settings
Copy the code
- mysql_secure_installation
Enter current password for root (enter for none):
Note: Enter the password of user root, which is empty by default, and press Enter.
Set root password? [Y/n] y
Do you want to set the root password? Type n. I already have a password.
Remove anonymous users? [Y/n] y
Explanation: Do you want to remove anonymous users? Type y for yes.
Disallow root login remotely? [Y/n] y
Don’t want root to log in remotely? Enter n to indicate no. DMS is the remote login of user root.
Remove test database and access to it? [Y/n] y
Explanation: Do you want to remove the test database? Type y for yes.
Reload privilege tables now? [Y/n] y
Explanation: Want to reload permissions? Type y for yes.
Copy the code
- Disallow root login remotely?
Remote connection setup
Server firewall
Copy the code
- ufw allow mysql
Open the remote connection of the account
Copy the code
- mysql -u root -p
Copy the code
- GRANT ALL PRIVILEGES ON *.* TO ‘user ‘@’%’ IDENTIFIED BY’ user ‘WITH GRANT OPTION; FLUSH PRIVILEGES;
Copy the code
- quit;
Database setup
Copy the code
- The bind – address = 127.0.0.1
Copy the code
- The bind – address = 0.0.0.0
Copy the code
- service mysql restart
The security group
Copy the code
- 100.104.175.0/24100104. 72.0/24100104. 5.0/24100104. 205.0/24
Copy the code
- ,10.153 121.43.18.0/24120.55. 177.0/24,10.137. 42.136/24, 176.106/24
DMS connection
Dms.console.aliyun.com/#/dms/rsLis…