Databaseds with mysql-5.7 (ubuntu 16.04)

Hi!
I have just compiled tango-9.2.2 + patches on ubuntu 16.04 64 bits.
The only problem I met was with the cretaion of tango db schema.
Ubuntu 16.04 comes with mysql-5.7. This version of mysql implements some restricions (features) about default values for timestamps, restricition on ORDER BY statemates , etc… These feture, known as SQL modes ( see chaper 6.1.7 of mysql-5.7 manual), if left at the default values of the installation, do not allow you to create the tango schema with the standard sql scripts.
A solution to this problem is to disable all the new SQL modes in the mysql server startup script.
On ubuntu 16.04 , you have to edit:

/etc/mysql/mysql.conf.d/mysqld.cof

and append the follwing line:

sql-mode=""

In this way you turn-off the sql modes.
After this the creation of the db schema is done wothout errors.



thanks

from MySQL 5.6.5, if not set sql_mode to disable strict mode, create_db_tables.sql will fail: create_db_tables.sql': Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

hdb++ 's create_hdb++_mysql.sql have same problem
Edited 8 years ago
Dear Jimmy & Claudio,

I do have the same problem to install Tango v9.2.2 in a cluster running Scientific Linux 6 + MySQL 5.1.73. By chance how did you solve the issue? I installed Tango version 8.1.2 on the same cluster without any issues.
I hadn't this issue on my laptop running Ubuntu 14.04 + MySQL 5.5.49.

Did you eventually upgrade MySQL server or fixed create_db_tables.sql? It seems that my MySQL strict mode is already disabled in my case.

Thanks for suggestions,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
Hi,Simone

I do not have MySQL 5.1.73, so i can't test on it.

For MySQL 5.7.x, I add:
[mysqld]
……
sql_mode=""

in my.cnf file, then solved the db creation problem.
 
Register or login to create to post a reply.