ubuntu安装mysql笔记
2015-08-28 本文已影响0人
wasw100
ubuntu安装mysql笔记
-
安装
sudo apt-get install mysql-server
-
远程可以访问
1.修改 /etc/mysql/my.cnf, 找到 bind-address 注释掉(也可以改为本机IP), 然后重启
```
sudo service mysql restart
```
2.允许远程访问, 使用 grant
```
grant all privileges on *.* to root@'%' identified by 'root'
```
-
删除远程访问
-
看看用户的访问信息, 然后删掉想删除的数据即可
use mysql select user, host from user; delete from user where ...
-
删除后执行
flush