Ubuntu Linux 14.04 (x86, 64-bit)默认安装的是mysql-5.5,目前mysql已经更新的5.7了。
首先进入https://dev.mysql.com/downloads/repo/apt/
最下面下载
执行:
# sudo dpkg -i mysql-apt-config_0.8.7-1_all.deb
中间会出来一个选项,默认选择最新的mysql版本,选择相应的版本之后,选择最下面的ok
即可,然后:
# sudo apt-get update
###更新完成之后
#sudo apt-get install mysql-server
###这时候敲tab键会出现:
mysql-server mysql-server-5.6 mysql-server-core-5.6
mysql-server-5.5 mysql-server-core-5.5
###第一个mysql-server就是最新版本的mysql,所以执行上面的命令即可
#sudo apt-get install mysql-server
出现以下提示:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-community-server (= 5.7.19-1ubuntu14.04) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
执行:
# sudo apt-get install
查看版本信息:
# mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.