When MySQL is installed, there are warning:
[Root@localhost mysql]# scripts/mysql_install_db--user=mysql installing MySQL system tables ... 2015-08-13 14:20:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
2015-08-13 14:20:09 0 [note]./bin/mysqld (mysqld 5.6.26) starting as process 1934 ... 2015-08-13 14:20:09 1934 [note] innodb:using mutexes to ref count buffer pool pages 2015-08-13 14:20:09 1934 [note] Innod B:the InnoDB memory heap are disabled 2015-08-13 14:20:09 1934 [note] innodb:mutexes and rw_locks use InnoDB ' s own Implem Entation 2015-08-13 14:20:09 1934 [note] innodb:memory barrier ' not ' used 2015-08-13 14:20:09 1934 [note] Innodb:compre ssed tables use zlib 1.2.3 2015-08-13 14:20:09 1934 [note] innodb:using Linux native AIO 2015-08-13 14:20:09 1934 [note] Innodb:not using CPU CRC32 instructions 2015-08-13 14:20:09 1934 [note] innodb:initializing buffer pool, size = 128.0M 2 015-08-13 14:20:09 1934 [Note] innodb:completed initialization of buffer pool 2015-08-13 14:20:10 1934 [note] Innodb:the-A-specified data fil
E./ibdata1 did not exist:a new database to is created! 2015-08-13 14:20:10 1934 [note] innodb:setting file./ibdata1 size to MB 2015-08-13 14:20:10 1934 [note] Innodb:datab
ASE physically writes the file full:wait ... 2015-08-13 14:20:10 1934 [note] innodb:setting log file./ib_logfile101 size to MB 2015-08-13 14:20:11 1934 [note] Inn odb:setting log file./ib_logfile1 size to MB 2015-08-13 14:20:12 1934 [note] innodb:renaming log file./ib_logfile10 1 to./IB_LOGFILE0 2015-08-13 14:20:12 1934 [Warning] innodb:new log files created, lsn=45781 2015-08-13 14:20:12 1934 [N
OTE] Innodb:doublewrite buffer not found:creating new 2015-08-13 14:20:12 1934 [note] Innodb:doublewrite buffer created
2015-08-13 14:20:12 1934 [note] innodb:128 rollback segment (s) are active. 2015-08-13 14:20:12 1934 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2015-08-13 14:20:12 1934 [note] innodb:foreign key constraint system tables created 2015-08-13-14:20:12 1934 [note] Inno
Db:creating tablespace and datafile system tables.
2015-08-13 14:20:12 1934 [note] innodb:tablespace and datafile system tables created. 2015-08-13 14:20:12 1934 [note] innodb:waiting for purge to start 2015-08-13 14:20:12 1934 [note] innodb:5.6.26 started; Log sequence number 0 2015-08-13 14:20:14 1934 [note] Binlog end 2015-08-13 14:20:14 1934 [note] Innodb:fts optimize
EAD exiting.
2015-08-13 14:20:14 1934 [note] innodb:starting shutdown ... 2015-08-13 14:20:16 1934 [note] Innodb:shutdown completed; Log sequence Number 1625977
OK
Filling Help Tables ...
2015-08-13 14:20:16 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
2015-08-13 14:20:16 0 [note]./bin/mysqld (mysqld 5.6.26) starting as process 1957 ... 2015-08-13 14:20:16 1957 [note] innodb:using mutexes to ref count buffer pool pages 2015-08-13 14:20:16 1957 [note] Innod B:the InnoDB memory heap are disabled 2015-08-13 14:20:16 1957 [note] innodb:mutexes and rw_locks use InnoDB ' s own Implem Entation 2015-08-13 14:20:16 1957 [note] innodb:memory barrier ' not ' used 2015-08-13 14:20:16 1957 [note] Innodb:compre ssed tables use zlib 1.2.3 2015-08-13 14:20:16 1957 [note] innodb:using Linux native AIO 2015-08-13 14:20:16 1957 [note] Innodb:not using CPU CRC32 instructions 2015-08-13 14:20:16 1957 [note] innodb:initializing buffer pool, size = 128.0M 2 015-08-13 14:20:16 1957 [note] innodb:completed initialization of buffer pool 2015-08-13 14:20:16 1957 [note] Innodb:highest supported the file format is barracuda.
2015-08-13 14:20:16 1957 [note] innodb:128 rollback segment (s) are active. 2015-08-13 14:20:16 1957 [note] innodb:waiting for purge to start 2015-08-13 14:20:16 1957 [note] innodb:5.6.26 started; Log sequence number 1625977 2015-08-13 14:20:17 1957 [note] Binlog end 2015-08-13 14:20:17 1957 [note] Innodb:fts Optimi
Ze thread exiting.
2015-08-13 14:20:17 1957 [note] innodb:starting shutdown ... 2015-08-13 14:20:18 1957 [note] Innodb:shutdown completed; Log sequence Number 1625987
OK
To-start mysqld at boot time and have to copy Support-files/mysql.server to the right place for your system please REMEM
BER to SET A PASSWORD for the MySQL root USER! To does so, start the server, then issue the following commands:./bin/mysqladmin-u root password ' new-password './bin/m Ysqladmin-u root-h localhost.localdomain password ' new-password ' Alternatively you can run:./bin/mysql_secure_instal Lation which'll also give you the option of removing the test databases and anonymous user created by default.
This is strongly recommended for production servers.
The manual for more instructions. You can start the MySQL daemon with:cd. ;./bin/mysqld_safe & can test the MySQL daemon with mysql-test-run.pl CD mysql-test; Perl mysql-test-run.pl Please a problems at Http://bugs.mysql.com/The latest information about MySQL is Availa ble on the web at http://www.mysql.com Support MySQL by buying support/licenses at Http://shop.mysql.com New deFault config file was created as./my.cnf and'll is used by default to the server when you start it. You could edit this file to change server Settings Warning:default config FILE/ETC/MY.CNF exists on the system this file 'll be read by default through the MySQL server If you don't want to use this, either remove it, or use the--defaults-file a Rgument to Mysqld_safe when starting the server [Root@localhost mysql]#
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
The reason for this is that since 5.6, timestamp's default behavior has been deprecated.
The default behavior of timestamp before MySQL 5.6.6:
Timestamp column if the null attribute is not explicitly declared, the default is not NULL. (Other data types, if not declared as NOT NULL, allow null values.) Sets the timestamp column value to null and is automatically stored as the current timestamp.
The first TIMESTAMP column in the table, if no null property, default, or on update is declared, the DEFAULT current_timestamp and on Update Current_timestamp properties are automatically assigned.
The second timestamp column in the table, which is automatically assigned ' 0000-00-00 00:00:00′ if it is not declared null or the default clause. Inserting a row does not indicate the value of the Change column, which is assigned the ' 0000-00-00 00:00:00′ by default and has no warning.
To turn off warnings, you need to add the following parameters:
Explicit_defaults_for_timestamp=true
After restarting MySQL, the error disappears, then timestamp's behavior is as follows:
Timestamp if the declaration not NULL is not displayed and is a null value, you can set the column to NULL instead of the default fill behavior.
The default Current_timestamp and on UPDATE current_timestamp properties are not assigned by TIMESTAMP.
A timestamp column that is declared NOT NULL and has no default clause is not a default value. When you insert a column into a datasheet without assigning a value to the timestamp column, if you are in strict SQL mode, an error is thrown, and if the strict SQL mode is not enabled, the column is assigned a value of ' 0000-00-00 00:00:00′ and a warning appears. (This is the same as MySQL processing other time type data, such as DateTime)
(See also: http://www.jb51.net/article/71107.htm)
That is, Explicit_defaults_for_timestamp closes the timestamp type field lock has some strange default behavior, after the argument is added, if you also want to specify default behavior for fields of type timestamp, Then you need to display the designation that appears when you create the table. Explicit_defaults_for_timestamp is the meaning of this: Displays a field that specifies the default value of timestamp type.