4

Once again I need your help:) . I am new to mysql and today when I decided to do some work and start the MySQL server, I get the following warning

"[Warning] TIMESTAMP with implicit DEFAULT value is deprecated". 

I know I should change something somewhere but I don't know where... I'm trying to start MySQL server with executing mysqld file in bin directory. I would be very grateful if someone manage to explain me why MySQL server does not want to start and what can I do... Thank you in advance.

John
  • 1
  • 13
  • 98
  • 177
DNA
  • 103
  • 1
  • 1
  • 7
  • Are you using `mysql.*` libraries? – imulsion Apr 20 '13 at 11:45
  • Well I've downloaded MySQL Community Server which is, I believe, a portable MySQL server that does not need to be installed. I get this error while trying to run MySQL from CMD. I believe that I use MySQL libraries. Basically I am trying to connect it with Java but when I decided to play around with it today, it gave me this warning :( – DNA Apr 20 '13 at 11:49
  • I can't even "re install" it by replacing the old extracted MySQL folder with a fresh one :( . – DNA Apr 20 '13 at 11:51
  • Read my answer; that looks like the problem, not uninstalling it. – imulsion Apr 20 '13 at 11:52
  • all mysql_.* families are deprecated use PDO/ mysqli and also provides full details so we can solve your issue. – Shushant Apr 20 '13 at 12:26
  • Well, I downloaded MySQL Community Server which is an archive and extracted it. Then I started MySQL server and with MySQL Workbench managed to access MySQL and create some tables. Later I downloaded mysql-connector-java-5.1.24 so I can connect MySQL server with Java. After that I imported that library into my Java project and that was all. Today, when I try to start MySQL server it gives me this error ... – DNA Apr 20 '13 at 12:37

3 Answers3

3

You'll want to set explicit_defaults_for_timestamp

  1. Append --explicit_defaults_for_timestamp=# onto your command line.
  2. Setting it in your option file my.ini / my.cnf / etc - Option-File Format.
  3. setting it as a system variable.
codemonkee
  • 2,881
  • 1
  • 25
  • 32
0

That is caused when upgrading from MySQL 5.5 to MySQL 5.6. It looks like you have more than one version of mysql on your computer. Read here for more.

imulsion
  • 8,820
  • 20
  • 54
  • 84
  • 1
    I don't have MySQL server installed on my PC :/ – DNA Apr 20 '13 at 12:29
  • Ok... It is written: "As indicated by the warning, to turn off the nonstandard behaviors, enable the new explicit_defaults_for_timestamp system variable at server startup." What is the file that I should change and where is it placed ? – DNA Apr 20 '13 at 14:50
0

if u r using mysql 5.6 and getting "[Warning] TIMESTAMP with implicit DEFAULT value is deprecated". when u use mysqld in commandline, just don't worry, don't panic... What u have to do is go in start menu-> programs-> mysql-> mysql server 5.6-> mysql commanline client.(Windows) u will be asked to enter password, enter ur root password. then u will see mysql> start creating database directly Try it its simple, but will solve ur problem... it solved mine!

bhabs
  • 133
  • 1
  • 2
  • 9