1. Use regular connections

  1. To change the mysql permission on the server, log in to mysql and run the following command
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'WITH GRANT OPTION;Copy the code
  1. Refresh permissions for them to take effect
FLUSH PRIVILEGES;
Copy the code

3. Perform the following steps to connect port 3306 on the server console





4. Check whether the connection is successful

2. Use SSH to connect to the database

  1. The first step



2. The second step



3. Check whether the connection is successful