I got a problem when I wanted to create a field in a database table which field type is DATETIME and default field value is CURRENT_TIMESTAMP. I run a server on Ubuntu 12.04 and MySql 5.5. I found that MySql 5.5 doesn't support that statement. So, I must upgrade my MySql server to MySql 5.6.
Then I read some articles on internet. Most old articles said that we must download and install MySql 5.6 manually from official site because Ubuntu 12.04 doesn't have any repository for it. But, this day Ubuntu 12.04 has launched PPA for MySql 5.6. So, what you should do is just to remove your old mysql-server, update your repository, and install new one. You can use this following commands.
apt-get -y remove mysql-server
apt-get -y autoremove
apt-get -y install software-properties-common
or
apt-get -y install python-software-properties (if add-apt-repository is still not exist)
add-apt-repository -y ppa:ondrej/mysql-5.6
apt-get update
apt-get -y install mysql-server
When it asks whether you want to update your my.cnf file or keep the old one, I prefer to update it to prevent unwanted error.
Comments
Post a Comment