Ubuntu手动安装mysql5.7.10
时间:2020-11-03 13:27 作者:admin
本教程为大家分享了Ubuntu手动安装mysql/' target='_blank'>mysql5.7.10的过程,供大家参考,具体内容如下
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.deblibmysqlclient-dev_5.7.10-1ubuntu14.04_amd64.deblibmysqld-dev_5.7.10-1ubuntu14.04_amd64.debmysql-client_5.7.10-1ubuntu14.04_amd64.debmysql-common_5.7.10-1ubuntu14.04_amd64.debmysql-community-client_5.7.10-1ubuntu14.04_amd64.debmysql-community-server_5.7.10-1ubuntu14.04_amd64.debmysql-community-source_5.7.10-1ubuntu14.04_amd64.debmysql-community-test_5.7.10-1ubuntu14.04_amd64.debmysql-server_5.7.10-1ubuntu14.04_amd64.debmysql-testsuite_5.7.10-1ubuntu14.04_amd64.debmysql-community_5.7.10-1ubuntu14.04_amd64.changes
(可以ls查看一下)
3、终端命令安装
0)、准备工作:更新依赖源及安装libaio1依赖
sudo apt-get updatesudo apt-get upgradeapt-get install libaio1
1)、以下是我的安装顺序,大致每台机子都一样,如果终端有提示缺少哪个依赖可以稍微修改安装顺序
sudo dpkg -i mysql-common_5.7.10-1ubuntu14.04_amd64.debsudo dpkg-preconfigure mysql-community-server_5.7.10-1ubuntu14.04_amd64.deb
此步需要输入数据的root密码
sudo dpkg -i libmysqlclient20_5.7.10-1ubuntu14.04_amd64.debsudo dpkg -i libmysqlclient-dev_5.7.10-1ubuntu14.04_amd64.debsudo dpkg -i libmysqld-dev_5.7.10-1ubuntu14.04_amd64.debsudo dpkg -i mysql-community-client_5.7.10-1ubuntu14.04_amd64.debsudo dpkg -i mysql-client_5.7.10-1ubuntu14.04_amd64.debsudo dpkg -i mysql-common_5.7.10-1ubuntu14.04_amd64.deb
2)、安装依赖包
sudo apt-get -f installsudo apt-get -f install libmecab2
3)、安装mysql-server
sudo dpkg -i mysql-community-server_5.7.9-1ubuntu14.04_amd64.debsudo dpkg -i mysql-server_5.7.9-1ubuntu14.04_amd64.deb
4、检测安装及配置
mysql -u root -p
输入之前设置的帐户密码
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。
(责任编辑:admin)