The mysql 5.7.18 zip version of MySQL is not like the one that you can install immediately by clicking on it and keep clicking on the next step. You need to configure it yourself. Although it is a little troublesome, I still prefer to use this version because it is simpler and you don’t have to install other plug-in tools just to install the database. 1. Download path Official website MySQL zip file download address Click the download button and follow the prompts to download without logging in; (download the file to, for example: D:\\) 2. Unzip mysql-5.7.18-winx64.zip downloaded to D:\\ After decompression, the mysql file directory address is: D:\\mysql-5.7.18-winx64 3. Configure system environment variables In the computer configuration, add the system environment variables, MYSQL_HOME: D:\\mysql-5.7.18-winx64 4. Add the my.ini file required for MySQL installation service Create the file my.ini in the directory D:\\mysql-5.7.18-winx64 [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 # Set the installation directory of mysql to basedir=D:\mysql-5.7.18-winx64 # Set the storage directory of mysql database data datadir=D:\mysql-5.7.18-winx64\data # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB The document mentions basedir and datadir: basedir: refers to the root directory of MySQL; datadir: This is the directory where the database data will be stored later, so you need to create a data folder in the MySQL root directory (you can create the directory location according to your actual ideas, but the configuration in the file needs to be consistent) The created files and folders, the file list is as follows: 5. Initialize the database Open cmd.exe and run it as an administrator. Because the environment variables have been configured, the following command can be executed successfully: mysqld --initialize --user=mysql --console Remember the assigned password, you will need to use it when you log in for the first time: 6. Install MySQL background service Execute the command in the cmd terminal in the previous step: mysqld --install MySQL57 7. Start MySQL system service net start MySQL57 Note: The above steps have been successfully installed. Other commands that may be used are as follows: Stop the service: net stop MySQL57 Delete service: sc delete MySQL57 (can be executed when problems occur) Possible problems If msvcp120.dll is missing, install vcredist_x86.exe or vcredist_x64.exe, depending on your system. Other issues If you execute the sc delete MySQL57 command, remember to clear all files in the data folder. If you execute the net start MySQL57 command, If you need to configure environment variables or the environment variables are configured incorrectly, please check carefully. 8. Log in for the first time and change the password Log in using the initial password: mysql -u root -p After logging in successfully, I use the show databases; command but it does not work, and I am prompted to reset my password: set password for root@localhost=password("your password") 9. Congratulations on completing the installation of the MySQL zip version The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: DockerToolBox file mounting implementation code
>>: How to directly access the docker for windows container intranet through an independent IP
Table of contents Import on demand: Global Import...
Table of contents 1. Nginx installation and start...
Table of contents 1. Preparation before installat...
1. IE browser mode Hack logo 1. CSS hack logo Copy...
Table of contents introduction Distinguish betwee...
Table of contents 1. Index Type 1. B+ Tree 2. Wha...
As one of the most commonly used and important ut...
This article shares the specific code of JavaScri...
This article mainly records a tomcat process, and...
Mysqldump is used for logical backup in MySQL. Al...
First: Copy code The code is as follows: <input...
01. Command Overview The locate command is actual...
virtualenv is a tool for creating isolated Python...
1. Tomcat service is not open Enter localhost:808...
Method 1: Please add the following code after <...