Ubuntu手动安装最新版mysql

前端之家收集整理的这篇文章主要介绍了Ubuntu手动安装最新版mysql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、下载安装包

MySQL官网下载地址

选择系统版本Ubuntu14.04后缀名为deb_bundle.tar的进行下载

Ubuntu Linux 14.04 (x86,64-bit),DEB Bundle MysqL Server 5.7.x 237.6M(此处x即为MysqL的最新版)

本文以MysqL5.7.10为示例

文件名为:MysqL-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar)

2、解压

放在 /usr/local/src 下解压:

1)、利用mv命令将安装包移动至目标路径:

mv /home/"当前登陆的用户名"/"安装包的下载路径"/MysqL-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar /usr/local/src(引号中的路径请自行修改

2)、cd到目标路径:

cd /usr/local/src

3)、赋予权限:

sudo chmod +x MysqL-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar

4)、解压:

tar -xf MysqL-server_5.7.10-1ubuntu14.04_amd64.deb-bundle.tar

解压出有以下文件:

libMysqLclient20_5.7.10-1ubuntu14.04_amd64.deb

libMysqLclient-dev_5.7.10-1ubuntu14.04_amd64.deb

libMysqLd-dev_5.7.10-1ubuntu14.04_amd64.deb

MysqL-client_5.7.10-1ubuntu14.04_amd64.deb

MysqL-common_5.7.10-1ubuntu14.04_amd64.deb

MysqL-community-client_5.7.10-1ubuntu14.04_amd64.deb

MysqL-community-server_5.7.10-1ubuntu14.04_amd64.deb

MysqL-community-source_5.7.10-1ubuntu14.04_amd64.deb

MysqL-community-test_5.7.10-1ubuntu14.04_amd64.deb

MysqL-server_5.7.10-1ubuntu14.04_amd64.deb

MysqL-testsuite_5.7.10-1ubuntu14.04_amd64.deb

MysqL-community_5.7.10-1ubuntu14.04_amd64.changes

(可以ls查看一下)



3、终端命令安装

0)、准备工作:更新依赖源及安装libaio1依赖

sudo apt-get update

sudo apt-get upgrade

apt-get install libaio1

1)、以下是我的安装顺序,大致每台机子都一样,如果终端有提示缺少哪个依赖可以稍微修改安装顺序

sudo dpkg -i MysqL-common_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg-preconfigure MysqL-community-server_5.7.10-1ubuntu14.04_amd64.deb

此步需要输入数据的root密码

sudo dpkg -i libMysqLclient20_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg -i libMysqLclient-dev_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg -i libMysqLd-dev_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg -i MysqL-community-client_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg -i MysqL-client_5.7.10-1ubuntu14.04_amd64.deb

sudo dpkg -i MysqL-common_5.7.10-1ubuntu14.04_amd64.deb

2)、安装依赖包

sudo apt-get -f install

sudo apt-get -f install libmecab2

3)、安装MysqL-server

sudo dpkg -i MysqL-community-server_5.7.9-1ubuntu14.04_amd64.deb

sudo dpkg -i MysqL-server_5.7.9-1ubuntu14.04_amd64.deb

4、检测安装及配置

MysqL -u root -p

输入之前设置的帐户密码

猜你在找的Ubuntu相关文章