A precondition
Using a remote connection tools (xshell) connected on a remote server Ali cloud
more information, please refer to: (b) the use Xshell connect to a remote server
Second, download MySQL
Use the following command to download:
sudo apt-get update
sudo apt-get install mysql-server
The installation process will remind you to set the MySQL password, which must bear in mind
and then use the following command to check the status of MySQL:
systemctl status mysql.service
Three, mysql configuration
carried out
vim /etc/mysql/mysql.conf.d
Will see there are multiple files after the execution, you just need to find the mysql.conf Enter OK.
After all, with the vim editor, so i click to enter edit mode,
and then comment out the bind-address, only to shield their local monitor, only the first to add a # sign.
#bind-address = 127.0.0.1
Here also the way the utf8 encoding is also configured.
[client]
default-character-set=utf8
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
After then type exit to exit, type the following command to restart operation
systemctl restart mysql.service
Next to be released permissions:
just need to change the password to use when their future login password.
grant all privileges on *.* to 'root'@'%' identified by 'password';
Then refresh:
flush privileges
At this point MySQL is already installed, then that is the test.
The use of local navicat tool to test whether the connection is successful
1. For mounting configuration Navicat Reference:
https://blog.csdn.net/Evan_love/article/details/79228638
2. Connect
New Connection -> Enter the server ip, user name, password, and port number 3306 Click connection test.
ps: If a connection failure occurs, please see if mysql port 3306 is open to start and Ali cloud