MySQL compact version installs and avoids 1055 errors and msvcp120.dll loss
The installation of the MySQL compact version is quick and easy, with 5.7 and the latest version 8 installed in roughly the same way.
You may encounter a 1055 error when using GROUP by grouping.
Additionally, you may experience msvcp120.dll loss during installation. (See problems that may be encountered)
Unzip add environment variable add my.ini file
In the MySQL root directory, which is the same directory as the Bin folder, create the My.ini
[mysql]# 设置mysql客户端默认字符集default-character-set=utf8[mysqld]#设置3306端口port = 3306# 设置mysql的安装目录basedir=C:\mysql-5.7.22-winx64# 设置mysql数据库的数据的存放目录datadir=C:\mysql-5.7.22-winx64\data# 允许最大连接数max_connections=200# 服务端使用的字符集默认为8比特编码的latin1字符集character-set-server=utf8# 创建新表时将使用的默认存储引擎default-storage-engine=INNODB
Basedir and DataDir, please modify according to your actual installation directory, focusing on
If you encounter a 1055 error, add the last
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Different computer sql_mode may not be the same, the last mention.
Initializing the database
Permissions are important to open Cmd.exe with administrator privileges
.\mysqld.exe --initialize --user=mysql --console
2018-07-16T04:34:04.664182Z 1 [Note] A temporary password is generated for [email protected]: -h1JoJrrAwXz
Where '-H1JOJRRAWXZ ' is the initial password, with no spaces
The last row shows the password.
Installation Services
.\mysqld.exe --install mysql
Service successfully installed.
Start the service
net start mysql
mysql 服务正在启动 .mysql 服务已经启动成功。
Log in and modify the initialization password
PS C:\Windows\system32> mysql -u root -pEnter password: ************mysql> set password for [email protected]=password(‘你的密码‘);Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
A possible problem.
If you need to reload, administrator privileges to execute Cmd.exe
net stop mysqlmysqld.exe --remove删除解压后的所有文件再次上述操作
If you are prompted to lose msvcp120.dll when executing the command line, or if memory is wrong, or no response,
Internet search ' DirectX Repair tool ' can be used to fill most DLLs.
MySQL compact version installs and avoids 1055 errors and msvcp120.dll loss