记录下,不用每次去查

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo apt install mysql-server
sudo netstat -tap | grep mysql
mysql_secure_installation //~mysql/bin/mysql_secure_installation
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf //bind-address
mysql-u root -p
CREATE USER 'username'@'%' IDENTIFIED BY 'passwd';//创建一个用户 可以远程访问
CREATE DATABASE mydb; //创建mydb这个库
GRANT SELECT, INSERT ON mydb.* TO 'username'@'%';
flush privileges;
sudo service mysql restart

留言

2018-10-05

⬆︎TOP