64-bit operating system it is best to install a 64-bit MySQL database, take full advantage of memory addressing ability, for Windows, the MySQL official website only provides 32-bit MSI installer, because in Windows installed 64-bit MySQL, select the decompression version of the installation. 1. Download MySQL 5.7 64-bit extract to D:\mysql-5.7.12-winx64\mysql-5.7.12-winx64 2. Copy my-default.ini, rename to My.inimy.ini fill in the following:
[mysqld] basedir=d:\mysql-5.7. -winx64\mysql-5.7. -winx64 datadir=d:\mysql-5.7. -winx64\mysql-5.7. -winx64\data 3306
3. Enter the following command to generate the initialization library mysqld--initialize--user=mysql--console The cause of the error: delete \ and C \ My.ini,mysql under Windows defaults to finding the default configuration file from these directories, causing the error above. A randomly generated password for the root user in the red box is executed after deleting the My.ini file under C: \ and C:\Windows:j#<c*r*ej5n; Generate the system database file to the configuration file specify Directory 4. Register service, start registering MySQL service D:\mysql-5.7.12-winx64\mysql-5.7.12-winx64\bin\mysqld--install MySQL--de Faults-file= "D:\mysql-5.7.12-winx64\mysql-5.7.12-winx64\my.ini" Start service
net start MySQL
5. Change the root password mysql-u root-p The root password generated before:j#<c*r*ej5n; Connection. Do not allow this operation, you must reset the root password SET PASSWORD = PASSWORD (' Your new password '); In mysql-5.7.12, there is no password this column in the user table of the system, and in mysql-5.6.*. We used mysql-5.6.* to update the root password directly with the UPDATE statement. This method cannot be used in mysql-5.7.12, we can only use SET PASSWORD = PASSWORD (' Your new password '); To change the password. After the password has been modified, the MySQL service needs to be restarted before it takes effect. Modify the root password set password = password (' 123456 '); Restart MySQL service re-login re-execute command, OK
MySQL 5.7 64-bit decompression version installation