首页 > 数据库 > MySQL > 正文

Linux(Ubuntu)下mysql5.7.17安装配置方法图文教程

2024-07-24 12:52:41
字体:
来源:转载
供稿:网友

前言

前面安装过mysql5.6,时隔三个月,开发那边反馈需要在MySQL中处理JSON类型的数据,查看文档,JSON是在5.7支持的新特性。于是着手安装Mysql57
Mysql5.6.28的安装://www.Vevb.com/article/103743.htm

安装

若使用apt-get install mysql-server进行安装,默认安装的不是最新的版本,于是考虑去官网找一个最新的社区版本。

1.获取最新的Mysql版本

在 https://dev.mysql.com/downloads/mysql/ 下选择操作系统版本(本例为Ubuntu),下载的时候注意要和操作系统版本相匹配(OS版本对应安装包版本)。

# cat /etc/issueUbuntu 12.04.5 LTS /n /l# wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-server_5.7.17-1ubuntu12.04_amd64.deb-bundle.tar

2.具体安装(因为依赖报的关系,需要注意安装次序)

# tar -xvf mysql-server_5.7.17-1ubuntu12.04_amd64.deb-bundle.tar# lltotal 712948drwxr-xr-x 2 root root 4096 Jan 20 10:07 ./drwxr-xr-x 5 root root 4096 Jan 19 19:23 ../-rw-r--r-- 1 7155 31415 1356802 Nov 29 03:30 libmysqlclient20_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 1904116 Nov 29 03:30 libmysqlclient-dev_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 30791660 Nov 29 03:29 libmysqld-dev_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 12998 Nov 29 03:30 mysql-client_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 82798 Nov 29 03:30 mysql-common_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 6831 Nov 29 03:30 mysql-community_5.7.17-1ubuntu12.04_amd64.changes-rw-r--r-- 1 7155 31415 21519804 Nov 29 03:30 mysql-community-client_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 55477882 Nov 29 03:29 mysql-community-server_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 208582030 Nov 29 03:30 mysql-community-source_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 45244026 Nov 29 03:30 mysql-community-test_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 7155 31415 12990 Nov 29 03:30 mysql-server_5.7.17-1ubuntu12.04_amd64.deb-rw-r--r-- 1 root root 365015040 Nov 30 02:11 mysql-server_5.7.17-1ubuntu12.04_amd64.deb-bundle.tar-rw-r--r-- 1 7155 31415 13014 Nov 29 03:30 mysql-testsuite_5.7.17-1ubuntu12.04_amd64.deb###安装依赖包sudo apt-get upgradesudo apt-get install libaio1###安装deb包sudo dpkg -i mysql-common_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i libmysqlclient20_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i libmysqlclient-dev_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i libmysqld-dev_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i mysql-community-client_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i mysql-client_5.7.17-1ubuntu12.04_amd64.debsudo dpkg -i mysql-community-source_5.7.17-1ubuntu12.04_amd64.deb###libmecab2 安装sudo apt-get -f install sudo dpkg -i mysql-community-server_5.7.17-1ubuntu12.04_amd64.deb###这边会提示设置root密码

基本配置(和以前的5.6版本有差异)

1.新增用户,赋权

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表