Mysql stepped pit

MySQL default Current time:

MySQL5.5 version of the following is not supported: datetime default now () can only be written timestamp default now ();

The MySQL5.6 above are supported datetime default now () is.

MySQL version extract the installation: (under windows)

1, unpacked out, first configuration environment variable.

2, then write a file in the root directory my.ini MySQL the
configuration content my.ini substantially as follows:

[mysqld] 
the basedir = "C: \ Program Files \ the MySQL Server 5.7" #MySQL decompression path 
datadir = "C: \ Program Files \ MySQL Server 5.7 \ data" in the data file path #MySQL 
Port = 3306 
Skip-name- Resolve 
Character-SET-Server UTF8 = 
max_connections = 200 is 
Lower-case_table_names. 1 = 
the sql_mode = NO_ENGINE_SUBSTITUTION, the STRICT_TRANS_TABLES 
[MySQL] 
default = UTF8-Character-SET 
[mysql_safe] 
timeZone = "CST" # prevent trouble zone later use 
default- character-set = utf8

3, Run as Administrator cmd, enter the bin directory of Mysql

mysqld -install  #安装服务
mysqld --initialize  #生成mysql的data目录,时间有点长耐心等待

4, check whether there is new data directory, the root directory mysql

5, cmd command window, type net start mysql start the service

6, start the service after successfully entering mysql -r root -p (first log on without a password, you can directly enter)

If you can not skip password: plus skip-grant-tables, restart the service in the my.ini mysqld mark and try again

Guess you like

Origin www.cnblogs.com/blackjoyful/p/11531724.html