在mysql5.6中可以同时设置两个。
linux上的mysql从5.5升级到5.6报错:
RROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
升级方法:
1、下载Linux版本的mysql5.6,并放入linux和windows的共享文件夹中。
2、tar xvf MySQL-5.6.36-1.el6.x86_64.rpm-bundle.tar
3、rpm -i MySQL-shared-compat-5.6.36-1.el6.x86_64.rpm
4、rpm -ivh –test MySQL-server-5.6.36-1.el6.x86_64.rpm
5、yum install perl
6、rpm -ivh MySQL-server-5.6.36-1.el6.x86_64.rpm
7、rpm -ivh MySQL-client-5.6.36-1.el6.x86_64.rpm
8、查看mysql版本mysql –version,发现现在版本已经变成了5.6