Simple installation of MySQL zip version

Simple installation of MySQL zip version under Windows

1. Download the version of MySQL-5.6.31-win32.zip.
2. Unzip to any path, such as "D:\Programm Files\".
3. Enter the MySQL path, copy my-default.ini to my.ini, and
add
basedir = "D:/Program Files/Mysql-5.5.10-win32"
datadir = "D:/Program Files/Mysql in the [mysqld] section -5.5.10-win32/data".
# Set the character set of the mysql server (optional)
character-set-server=utf8 #The
following line is already there, no need to add
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[client]
# Set the character set of the mysql client (optional)
default-character -set=utf8
4. Add the MySQL bin directory path to the system variable. (Optional)
5. Register the service
CMD and enter the MySQL/bin folder
mysqld --install "MySQL Database Service" --defaults-file="D:\Program Files\MySQL-5.6.31-win32\my.ini"
("MySQL Database Service" is the service name, quotation marks are required with spaces, and can be obtained by yourself)
("D:\Program Files\MySQL-5.6.31-win32\my.ini" is the INI path, and quotation marks are required with spaces)
Start the service
net start "MySQL Database Service"
6. Log in to MySQL for the first time
mysql -u root -p
(the password is empty)
7. Set the password
mysql> use mysql
Database changed
mysql> update user set PASSWORD = PASSWORD('your new password' ) where USER='root' and HOST='localhost';
Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> flush privileges;
mysql> exit
8. Done.

Friendly reminder: mysql1067 is generally the reason for my.ini configuration.
          mysql unknown variable sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES is in the [mysqld] section

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326941138&siteId=291194637