Home > Database > Mysql Tutorial > body text

How to configure the decompressed version of mysql

coldplay.xixi
Release: 2020-10-09 15:11:44
Original
2723 people have browsed it

How to configure the decompressed version of mysql: first initialize the data directory; then install the MySQL service, the code is [bin\mysqld --install]; finally switch to the bin directory and execute the command [net start mysql].

How to configure the decompressed version of mysql

Method to configure the decompressed version of mysql:

1. First download the MySQL community server from the MySQL official website Version (MySQL Community Server). Click [Downloads] - [MySQL Community Edition] - [MySQL Community Server] in sequence, and finally select [Windows (x86, 64-bit), ZIP Archive] in the download list. After downloading the compressed package, unzip it to an installation directory.

How to configure the decompressed version of mysql

2. Find the my-default.ini configuration file in the extracted folder, copy it to a new ini file, and rename it to my.ini. Open it for editing, add a line under [client]: default-character-set=gbk, and then set basedir and datadir.

[mysqld]

#Set the installation directory of mysql

basedir=C:\MyInstalledSofts\mysql-5.7.17-winx64

#Set mysql The data storage directory of the database must be data, or \\xxx\\data

datadir=C:\MyInstalledSofts\mysql-5.7.17-winx64\data
Copy after login

How to configure the decompressed version of mysql

3. Add the environment variable MYSQL_HOME, and the variable value is the installation directory path of MySQL. Add ";%MTSQL_HOME%\bin;" to the environment variable path

How to configure the decompressed version of mysql

4. Initialize the data directory. In the command prompt, change the directory to the MySQL installation root directory, and then execute the command: bin\mysqld --defaults-file=my.ini --initialize-insecure.

How to configure the decompressed version of mysql

5. Install the MySQL service. Or execute the command in the MySQL installation root directory: bin\mysqld --install. After the installation is successful, it will prompt "Service successfully installed".

How to configure the decompressed version of mysql

#6. Finally, switch to the bin directory and execute the command: net start mysql to start the MySQL service you just installed. After successful startup, you can use MySQL normally.

How to configure the decompressed version of mysql

Related free learning recommendations: mysql database(Video)

The above is the detailed content of How to configure the decompressed version of mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template