MySQL 5.6.10通过apt-get

时间:2013-02-19 10:41:59

标签: mysql apt-get aptitude

MySQL 5.6.10现在一般可用。如果我尝试升级它,但是说我已经是最新版本,即使已安装的版本是5.5.29。我在Ubuntu 12.04上。

$ sudo apt-get install --upgrade mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
$ mysql --version
mysql  Ver 14.14 Distrib 5.5.29, for debian-linux-gnu (x86_64) using readline 6.2

我事先跑了sudo apt-get update

有没有人设法通过aptitude安装MySQL 5.6?

1 个答案:

答案 0 :(得分:4)

我不知道如何通过aptitude做到这一点,但你可以尝试从源代码编译最新版本。

  • 安装libaio
$ cd /opt
$ wget http://www.morphisms.net/~wkj/download/libaio.tbz
$ bunzip2 libaio.tbz
$ tar xf libaio.tar
  • 下载MySQL 5.6.10
$ wget http://www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/
$ tar xzf mysql-5.6.10.tar.gz
$ cd mysql-5.6.10
  • 配置并编译MySQL
$ PATH=$PATH:/opt/bison/bin   #bison binary should be in your path

$ cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/opt/mysql-5.6.10/data/ 
-DCMAKE_INSTALL_PREFIX=/opt/mysql-5.6.10 -DCURSES_LIBRARY=/opt/ncurses/lib/libncurses.a 
-DCURSES_INCLUDE_PATH=/opt/ncurses/include/ -DHAVE_LIBAIO_H=/opt/libaio/include/ 
 -DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON 
-DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF -DDEFAULT_CHARSET=utf8 
-DENABLED_LOCAL_INFILE=TRUE -DWITH_ZLIB=bundled

$ make

设置正确的系统位置!

  • 安装
  

make install

这对我有用。途经:http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/download_configure_compile_and_install_mysql_56.php