debian apt get mysql_如何使用apt-get在Debian中升级MySQL?

重建实验5.6来自实验的MySQL源代码很容易接近琐碎.但是,您将需要大量磁盘空间;构建完成后,构建目录使用5.2 GB.此外,构建需要一段时间,并运行大量的测试.我没有时间计算它,但允许几个小时.可以禁用测试,但我建议让它们运行 – 只要它们通过它就是无害的.他们在我的机器上做了.

好消息是我能够毫不费力地构建和安装它.我运行了以下基本测试.

faheem@orwell:~$mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 50

Server version: 5.6.16-1~exp1 (Debian)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

所以,我至少可以连接到服务器.这是包安装的样子:

$dpkg -l | grep mysql

ii libdbd-mysql-perl 4.021-1+b1 amd64 Perl5 database interface to the MySQL database

ii libmysqlclient18:amd64 5.5.35+dfsg-0+wheezy1 amd64 MySQL database client library

ii libqt4-sql-mysql:amd64 4:4.8.2+dfsg-11 amd64 Qt 4 MySQL database driver

ii mysql-client-5.6 5.6.16-1~exp1 amd64 MySQL database client binaries

ii mysql-client-core-5.6 5.6.16-1~exp1 amd64 MySQL database core client binaries

ii mysql-common 5.5.35+dfsg-0+wheezy1 all MySQL database common files, e.g. /etc/mysql/my.cnf

ii mysql-common-5.6 5.6.16-1~exp1 all MySQL 5.6 specific common files, e.g. /etc/mysql/conf.d/my-5.6.cnf

ii mysql-server-5.6 5.6.16-1~exp1 amd64 MySQL database server binaries and system database setup

ii mysql-server-core-5.6 5.6.16-1~exp1 amd64 MySQL database server binaries

ii python-mysqldb 1.2.3-2 amd64 Python interface to MySQL

这是步骤的细分.

>如果您安装了任何wheezy MySQL 5.5软件包,请将其删除,

它们只会在以后造成麻烦.如果有任何包

取决于那些,他们也必须去.

>首先,获取消息来源.你需要添加以下(或类似的,

调整您的首选服务器)到/etc/apt/sources.list:

deb-src http://debian.lcs.mit.edu/debian/ experimental main non-free contrib

>还要将以下内容添加到/ etc / apt / preferences中.

Package: *

Pin: release a=experimental

Pin-Priority: 1

>然后跑

apt-get update

>然后跑

apt-get source mysql-5.6

在一些合适的目录中.我通常在/usr/local/src中创建一个目录,

在这种情况下,请说/usr/local/src / mysql.

>然后cd进入/usr/local/src / mysql.

>跑

sudo apt-get build-dep mysql-5.6

在我的机器上安装了几个包.

>安装一些用于构建的基本包.

apt-get install build-essential devscripts fakeroot

然后cd进入生成的源目录/usr/local/src/mysql/mysql-5.6-

5.6.16并运行

debuild -uc -us

这需要一段时间来构建.在某些情况下,增加是个好主意

版本号,但这里没有必要.因为它不太可能

任何其他MySQL 5.6程序包都会进入wheezy.

如果您不想运行测试,则可以改为使用

DEB_BUILD_OPTIONS="nocheck" debuild -uc -us

>现在你应该安装

libdbd-mysql-perl,它是mysql包的运行时依赖项.

apt-get install libdbd-mysql-perl

>然后将一级添加到/usr/local/src / mysql.应该有一些

?deb包那里.你至少要安装

mysql-client-core-5.6_5.6.16-1~exp1_amd64.deb

mysql-common-5.6_5.6.16-1~exp1_all.deb

mysql-server-5.6_5.6.16-1~exp1_amd64.deb

mysql-client-5.6_5.6.16-1~exp1_amd64.deb

mysql-server-core-5.6_5.6.16-1~exp1_amd64.deb

这可以通过运行来完成:

dpkg -i mysql-client-core-5.6_5.6.16-1~exp1_amd64.deb

mysql-common-5.6_5.6.16-1~exp1_all.deb

mysql-server-5.6_5.6.16-1~exp1_amd64.deb

mysql-client-5.6_5.6.16-1~exp1_amd64.deb

mysql-server-core-5.6_5.6.16-1~exp1_amd64.deb

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值