古老的榕树

Ubuntu 14.04 安装 64位的 MySQL 5.7.9

潘军杰 发表于 2015-07-04 23:12 阅读(3999) 评论(2) 赞(1)
到官网 http://dev.mysql.com/downloads/mysql/ 下载
针对 Ubuntu 14.04 的 64 位版本

Ubuntu Linux 14.04 (x86, 64-bit), DEB Bundle
MySQL Server 5.7.9 237.6M 
(文件名: mysql-server_5.7.9-1ubuntu14.04_amd64.deb-bundle.tar)

放在 /home/soft/ 下解压:

cd /home/soft/
sudo chmod +x mysql-server_5.7.9-1ubuntu14.04_amd64.deb-bundle.tar
tar -zxvf mysql-server_5.7.9-1ubuntu14.04_amd64.deb-bundle.tar

解压出以下文件:

libmysqlclient20_5.7.9-1ubuntu14.04_amd64.deb

libmysqlclient-dev_5.7.9-1ubuntu14.04_amd64.deb

libmysqld-dev_5.7.9-1ubuntu14.04_amd64.deb  

mysql-community-client_5.7.9-1ubuntu14.04_amd64.deb

mysql-community-server_5.7.9-1ubuntu14.04_amd64.deb      

mysql-community-source_5.7.9-1ubuntu14.04_amd64.deb

mysql-client_5.7.9-1ubuntu14.04_amd64.deb         

mysql-community-test_5.7.9-1ubuntu14.04_amd64.deb

mysql-common_5.7.9-1ubuntu14.04_amd64.deb         

mysql-server_5.7.9-1ubuntu14.04_amd64.deb

mysql-community_5.7.9-1ubuntu14.04_amd64.changes  

mysql-testsuite_5.7.9-1ubuntu14.04_amd64.deb


更新设置到最新系统:
sudo apt-get update
sudo apt-get upgrade
apt-get install libaio1

然后分别安装以下的包:
sudo dpkg -i mysql-common_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.9-1ubuntu14.04_amd64.deb
此步需要输入数据的root密码

sudo dpkg -i libmysqlclient20_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-client_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.9-1ubuntu14.04_amd64.deb
sudo dpkg -i mysql-common_5.7.9-1ubuntu14.04_amd64.deb

sudo apt-get -f install
此步为了安装依赖包 libmecab2

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

这时数据安装完成,并自动启动


查看mysql安装的路径和依赖:

whereis mysql

mysql: /usr/bin/mysql /etc/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

这时你会发现 mysql以服务形式自启动
标签: Ubuntu MySQL 数据库
2 条网友评论

1 楼: baoyalv (博主) 发表于 2015-12-27 20:15:42   回复 TA

Linux 里编译 MySQL 有点烦,太多依赖文件,都不知道其中的依赖关系!

2 楼: baoyalv (博主) 发表于 2015-12-27 20:22:27   回复 TA

引用"baoyalv"的评论

Linux 里编译 MySQL 有点烦,太多依赖文件,都不知道其中的依赖关系!
如果直接 apt-get install 那就是太简单了,不过 Ubuntu 14.04 和 Debian 7 下的版本有点老。估计在 5.5 或之下。
称呼*
邮箱*
内容*
验证码*
验证码 看不清换张