datetime(6) works on XAMPP but not on latest Ubuntu MySQL server -
I have an API which I can use only 1000 times per day.
So every time I call API, keep a timestamp in a database. Now if I put a timestamp in a database in the same database, and this is the primary key, then I get an exception, causing the problem ( 6) The problem has been solved by adding <(p> number of each other)
create tab 'epical' (`timestamp) day-time (6) tap default cURRENT_TIMESTAMP (6), primary key (`Timestamp`) engine = InnoDB DEFAULT CHARSET = latin1;
If I use workspace and keep it from Xampp on Windows in my MySQL, this is fine and without problems.
If I add the exact same code in the workspace of my Ubuntu lamp server, it says that there is a syntax error.
Does anyone know why, why are documents, why link to a blog? Or perhaps more important, is a suggestion for a positive solution?
A version difference between mysql is Local and Ubuntu Server.
At least you have MySQL 5.6.4 in your locality where it is less than in Ubuntu, and datetime (n)
In this case you have to use
as The table may be required 'Epical' (`timestamp) timestamp not tap default CURRENT_TIMESTAMP, primary key (` timestamp`) engine = InnoDB DEFAULT CHARSET = latin1;
Note that in the earlier version of Mysql, you do not have to tap from time to time
'timestamp' CURRENT_TIMESTAMP
Comments
Post a Comment