前期准备:
依赖包查询地址:https://pkgs.org/ (在搜索框中搜索所需要的deb包)
依赖包libmecab2:
64位:http://archive.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_amd64.deb
32位:http://archive.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_i386.deb
依赖包libaio1:
64位:http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-2_amd64.deb
32位:http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-2_i386.deb
mysql包:
64位:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.25-1ubuntu16.04_amd64.deb-bundle.tar
32位:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.25-1ubuntu16.04_i386.deb-bundle.tar
安装mysql:
1> tar xvf mysql-server_5.7.25-1ubuntu16.04_amd64.deb-bundle.tar
2> sudo dpkg -i libaio1_0.3.110-2_amd64.deb
3> sudo dpkg-preconfigure mysql-community-server_*.deb
需要设置root用户的密码(建议大写字母+小写字母+特殊字符)
4> sudo dpkg -i mysql-common_*.deb
5> sudo dpkg -i mysql-community-client_*.deb
6> sudo dpkg -i mysql-client_*.deb
7> sudo dpkg -i mysql-community-server_*.deb
如果报一下错误,需要安装依赖包:
7.1> sudo dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb
7.2> sudo dpkg -i mysql-community-server_*.deb
配置远程登录:
1> mysql -uroot –p{密码是前面设置的}
2> grant all privileges on *.* to 'root'@'%'identified by '密码' with grant option;
3> exit;
4> cd /etc/mysql/mysql.conf.d
5> sudo vi mysqld.cnf
注释bind-address = 127.0.0.1
6> systemctl restart mysql.service