ubuntu 14安装mysql5.7

一、下载bundle包 

wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.23-1ubuntu14.04_amd64.deb-bundle.tar

二、选好目录解压

tar -xvf mysql-server_5.7.23-1ubuntu14.04_amd64.deb-bundle.tar


三、使用脚本安装顺序deb包,顺便解决依赖关系,成功安装后出现设置root密码界面

dpkg -i mysql-common_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i libmysqlclient20_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i libmysqlclient-dev_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i libmysqld-dev_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i mysql-community-client_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i mysql-client_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i mysql-community-source_5.7.23-1ubuntu14.04_amd64.deb
sleep 3

dpkg -i mysql-community-server_5.7.23-1ubuntu14.04_amd64.deb

apt-get -f install

安装server的时候可能会提示你需要有libmecab2环境依赖,可以去

https://www.ubuntuupdates.org/package/core/trusty/universe/base/libmecab2

下载ubuntu 14 的 libmecab2包(trusty (14.04)),注意不要下成16+的版本了

sudo dpkg -i libmecab2_0.996-1.1_amd64.deb

安装成功后,再继续安装server即可。

 

四、启动服务

service mysql start

五、如果要设置远程登录需新建用户并增加权限

mysql>CREATE USER 'root'@'%' IDENTIFIED BY '123';
mysql>GRANT all ON *.* TO 'root'@'%';
mysql>flush privileges;
--------------------- 
作者:因为兴趣而当英雄 
来源:CSDN 
原文:https://blog.csdn.net/xuzhenwen_/article/details/82751838 

只是修改了一部分~

你可能感兴趣的:(mysql,Ubuntu)