- 安装
sudo apt-get install mysql-server
sudo apt-get install mysql-client // 可选
sudo apt-get install libmysqlclient-dev // 可选,c/c++调用mysql需要
- 设置远程访问
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf -> 注释掉
bind-address = 127.0.0.1
- 登录并赋权限
mysql [-h localhost] -uroot -p123456 // 可连接局域网内其他主机mysql
grant all on *.* to root@'%' identified by '123456' with grant option;
flush privileges;
- 重启服务器服务
service mysql restart
- 可视化工具
sudo apt-get install mysql-workbench