在Ubuntu16.04下安装mysql 及 mysql-workbench

  1. 安装
sudo apt-get install mysql-server
sudo apt install mysql-client
sudo apt install libmysqlclient-dev
  1. 验证是否安装成功
sudo netstat -tap | grep mysql
  1. 设置mysql允许远程访问
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf # 注释掉bind-address = 127.0.0.1
  1. 进入mysql,执行授权命令
mysql> grant all privileges on *.* to root@'%' identified by '你的密码' with grant option;
mysql> flush privileges;
  1. 重启mysql
service mysql restart
  1. 安装mysql-workbench
~$ sudo apt-get install mysql-workbench
# 运行
~$ mysql-workbench

你可能感兴趣的:(在Ubuntu16.04下安装mysql 及 mysql-workbench)