1.
sudo apt-get install mysql-server
2.
sudo apt isntall mysql-client
3.
sudo apt install libmysqlclient-dev
数据库安装完成
4.为用户赋予远程连接
5.数据库登录
mysql -u root -p
6.创建用户
6.为用户赋予权限
grant all on *.* to root@'%' identified by '你的密码' with grant option;
2.sudo vi mysql.conf.d/mysqld.cnf
grant all on *.* to space@'%' identified by '
mysql -uroot -p
insert into mysql.user(Host,User,Password) values("%","space","space");
grant all on *.* to space@'%' identified by 'space' with grant option;
grant all on *.* to root@'%' identified by '你的密码' with grant option;
刷新权限
flush privileges;
网友评论