MySQL相关

Ubuntu16.04 deb安装 mysql 5.7.25(无

2019-01-29  本文已影响467人  UMF_士弘

前期准备:

依赖包查询地址: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_i386.deb

32位:http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-2_amd64.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

所需的deb包

2> sudo dpkg -i libaio1_0.3.110-2_amd64.deb

libaio1 依赖包安装

3> sudo dpkg-preconfigure mysql-community-server_*.deb

需要设置root用户的密码(建议大写字母+小写字母+特殊字符)

输入密码 再次输入密码

4> sudo dpkg -i mysql-common_*.deb

mysql基础包

5> sudo dpkg -i mysql-community-client_*.deb

mysql-community-client安装

6> sudo dpkg -i mysql-client_*.deb

mysql-clien 安装

7> sudo dpkg -i mysql-community-server_*.deb

如果报一下错误,需要安装依赖包:

依赖报错

7.1> sudo dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb

libmecab2依赖包安装

7.2> sudo dpkg -i mysql-community-server_*.deb

mysql server安装

配置远程登录:

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

上一篇下一篇

猜你喜欢

热点阅读