Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't start Mysql 5.6 server due to "TIMESTAMP with implicit DEFAULT value is deprecated" Error? [closed]

Tags:

mysql

Ok, Here is my story, I went to mysql.com site & downloaded the file mysql-5.6.11-winx64.zip into C:, then I unziped it. Then I went to bin folder & started the server by using this command:

C:\mysql-5.6.11-winx64\bin\mysqld --standalone --local-infile=1

Everything was ok as the Mysql server started smoothly. I then stopped server using this command:

C:\mysql-5.6.11-winx64\bin\mysqladmin -u root shutdown

The Server was shutdowned properly.

I used this way to start & stop mysql server a few times without any problem.

However, yesterday, I started the Mysql server but then, at the end of the day, i turned off my PC while my MySQL server was still in the Starting Mode (ie, i did not shutdown mysql using "bin\mysqladmin -u root shutdown" before turned off my PC).

Also, when my PC got turned off at that time, the Win 7 was starting to download some packages from the internet to update Win7 so the configuration of win7 could be changed.

But today I could not start Mysql Server using the above command as there's an error:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. 
Pls use --explicit_defaults_for_timestamp server option (see documentation for more details).

I searched over internet & some people said that I have to go to my.cnf file & add this line into:

explicit_defaults_for_timestamp = TRUE

However, there is no my.cnf file in mysql 5.6, there a lot of cnf file in mysql5.6 but with different names:

mysql-5.6.11-winx64\data\auto.cnf
mysql-5.6.11-winx64\mysql-test\include\default_client.cnf
mysql-5.6.11-winx64\mysql-test\include\default_my.cnf
mysql-5.6.11-winx64\mysql-test\include\default_mysqld.cnf
mysql-5.6.11-winx64\mysql-test\include\default_mysqld_autosize.cnf
mysql-5.6.11-winx64\mysql-test\include\default_mysqld_ndbd.cnf

I tried to add explicit_defaults_for_timestamp = TRUE into all above cnf file but no help, i still couln't start mysql

I don't want to reinstall cos I created a big DB in the current mysql Server.

So how to fix it?

Note: when first time I ran Mysql server, win7 pop up a message saying something (i couldn't remember) such as "do you allow ... Firewall", so do u think that is causing the issue since Win7 got its configuration updated & somehow it reset the Firewall so the Mysql server couldn't start?

like image 982
Tum Avatar asked Oct 05 '22 00:10

Tum


2 Answers

@ Galadai, I fixed, I unzip the "mysql-5.6.11-winx64.zip" & then copy the data folder in the old "mysql-5.6.11-winx64" into new "mysql-5.6.11-winx64" but not copy "ib_logfile0" & "ib_logfile1" files, then start the new "mysql-5.6.11-winx64", then it works ok. Thax you for our help anyway.

like image 74
Tum Avatar answered Oct 16 '22 10:10

Tum


On Windows, the configuration file is my.ini, not my.cnf, which in my case is in

C:\ProgramData\MySQL\MySQL Server 5.6

Once you've made changes to the .ini file start it with:

mysqld --defaults-file="C:\{path to .ini file}\my.ini"     
like image 45
Galadai Avatar answered Oct 16 '22 10:10

Galadai