如何在 ubuntu 12.04 中升级到 mysql 5.6

How to upgrade to mysql 5.6 in ubuntu 12.04

我需要将 mysql 5.5 升级到 5.6,以避免在导入 sql 文件时出现一些问题。

ERROR 1293 (HY000) at line 231: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

如何升级?

只需运行以下命令:

apt-get -y remove mysql-server
apt-get -y autoremove
apt-get -y install software-properties-common
add-apt-repository -y ppa:ondrej/mysql-5.6
apt-get update
apt-get -y install mysql-server