System environment: win 7, 32-bit system
mysql version: 5.7.13 community version mysql download address: http://dev.mysql.com/downloads/mysql/, I downloaded a Windows (x86, 32
) size of 296.5M
-bit), ZIP Archive
mysql official installation documentation: http://dev.mysql.com/doc/refman/5.7/en/windows-install-archive.html
The installation and configuration steps begin below:
1. Download the downloaded file Extract mysql-5.7.13-win32.zip to a partition or directory, such as drive C. After decompression, you will find a my-default.ini file in the mysql-5.7.13-win32 directory. Put this file in the directory you want to place, and rename it my.ini, then edit it, open the items such as basedir, datadir, port, etc., and configure as follows:
basedir = F:\\mysql-5.7.13-win32 datadir = F:\mysql-5.7.13-win32\\data port = 3306
2. Enter the decompression directory of mysql under the windows command line, and then execute
F:\mysql-5.7.13-win32\bin>mysqld --defaults-file=F:\mysql-5.7.13-win32\my.ini --initialize
According to the instructions in the official installation documentation, after initialization, a temporary random password for the root account will be given. The following passage is excerpted from the official documentation:
With --initialize but not --initialize-insecure, the server generates a random password, marks it as expired, and writes a message displaying the password: [Warning] A temporary password is generated for root@localhost: iTag*AfrH5ej
But after I run this command, nothing appears!
Don't care so much, I started to start mysql
F:\mysql-5.7.13-win32\bin>mysqld --console
The following information is displayed on the command line:
2016-07-25T11:09:58.866483Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details). 2016-07-25T11:09:58.866483Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'E RROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2016-07-25T11:09:58.866483Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not s and. 2016-07-25T11:09:58.866483Z 0 [Warning] Insecure configuration for --secure-file -priv: Current value does not restrict location of generated files. Consider set ting it to a valid, non-empty path. 2016-07-25T11:09:58.867483Z 0 [Note] mysqld (mysqld 5.7.13) starting as process 9112 ... 2016-07-25T11:09:58.878483Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows in terlocked functions 2016-07-25T11:09:58.879483Z 0 [Note] InnoDB: Uses event mutexes 2016-07-25T11:09:58.880484Z 0 [Note] InnoDB: Memory barrier is not used 2016-07-25T11:09:58.881484Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-07-25T11:09:58.883484Z 0 [Note] InnoDB: Number of pools: 1 2016-07-25T11:09:58.902485Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2016-07-25T11:09:58.916486Z 0 [Note] InnoDB: Initializing buffer pool, total siz e = 128M, instances = 1, chunk size = 128M 2016-07-25T11:09:58.936487Z 0 [Note] InnoDB: Completed initialization of buffer pool 2016-07-25T11:09:59.032492Z 0 [Note] InnoDB: Highest supported file format is Ba rracuda. 2016-07-25T11:09:59.259505Z 0 [Note] InnoDB: Creating shared tablespace for temp orary tables 2016-07-25T11:09:59.260505Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2016-07-25T11:10:00.166557Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB. 2016-07-25T11:10:00.171557Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2016-07-25T11:10:00.174558Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2016-07-25T11:10:00.175558Z 0 [Note] InnoDB: Waiting for purge to start 2016-07-25T11:10:00.336567Z 0 [Note] InnoDB: 5.7.13 started; log sequence number 2524844 2016-07-25T11:10:00.338567Z 0 [Note] Plugin 'FEDERATED' is disabled. 2016-07-25T11:10:00.353568Z 0 [Note] InnoDB: Loading buffer pool(s) from F:\mysq l-5.7.13-win32\data\ib_buffer_pool 2016-07-25T11:10:01.957660Z 0 [Warning] Failed to set up SSL because of the foll owing SSL library error: SSL context is not usable without certificate and priva I key you 2016-07-25T11:10:01.959660Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2016-07-25T11:10:01.962660Z 0 [Note] IPv6 is available. 2016-07-25T11:10:01.965660Z 0 [Note] - '::' resolves to '::'; 2016-07-25T11:10:01.969660Z 0 [Note] Server socket created on IP: '::'. 2016-07-25T11:10:06.438916Z 0 [Note] Event Scheduler: Loaded 0 events 2016-07-25T11:10:06.439916Z 0 [Note] mysqld: ready for connections. Version: '5.7.13' socket: '' port: 3306 MySQL Community Server (GPL) 2016-07-25T11:10:11.615212Z 0 [Note] InnoDB: Buffer pool(s) load completed at 16 0725 11:10:11
Mysql should have started successfully, and then I used the mysql client software to log in. The problem came, and the problem came again as promised. . .
Login requires a password, and I never get a temporarily generated password! This official installation document is too boring.
3. Now I am at a loss. After thinking about it for a while, I will try the --initialize-insecure parameter if I want. After all, insecure means insecure. . .
So I stopped mysql, deleted the initialized data directory, executed the following command, and re-initialized:
F:\mysql-5.7.13-win32\bin>mysqld --defaults-file=F:\mysql-5.7.13-win32\my.ini --initialize-insecure
As before, it still runs without any prompts.
start mysql again
F:\mysql-5.7.13-win32\bin>mysqld --console
Then I use the navicat client software to log in again, set the password to empty, and successfully log in to mysql this time!
Of course, remember to change the root password after logging in.
4. Finally, after the decompressed version is installed, it is found that the entire mysql has reached 1.66G, which takes up a lot of hard disk space.
Of course, you can continue to install 3307, 3308, 3309 by decompressing. . . .