Enable MySQL remote access permission to allow remote connection

Time:2019-12-2

Environmental Science

  • Ubuntu 18.04
  • MySQL5.7

Log in MySQL database

mysql -uroot -p

Add remote connection permission

use mysql;
grant all privileges  on *.* to [email protected]'%' identified by "password";
flush privileges;

Modify MySQL configuration file

vim /etc/mysql/mysql.conf.d/mysqld.cnf

Annotatebind-addressThis line

Restart MySQL service

service mysql restart

Recommended Today

JavaScript (E5, 6) regular learning summary learning, can see can not see!

1. overview Regular expression is a method to express text pattern (string structure). There are two ways to create: One is to use literals, with slashes for start and end. var regex = /xyz/ The other is to use the regexp constructor. var regex = new RegExp(‘xyz’); The main difference between them is that the […]