Home > Database > Mysql Tutorial > body text

Detailed steps for decompressing and installing mysql (pictures and text)

不言
Release: 2019-01-26 11:19:21
forward
4779 people have browsed it

This article brings you the detailed steps (pictures and texts) about mysql decompression and installation. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Download the compressed package, address 1 (official website download): https://www.mysql.com/downloads/

Address 2 (Baidu network disk): https://pan .baidu.com/s/12lnpcr3thBe9k-6CyxvHeg Extraction code: j9ya

The official website download method is as follows:

#2. Unzip the compressed package to your favorite folder; (in my case, it is D:\newdream\mysql\mysqlserver, which will be replaced by the installation path later)

3. Set environment variables, Right-click My Computer->Properties->Advanced System Settings->Environment Variables->Find path in the system variables, click Edit, and add ";Installation Path\bin;". (Separate ";" with semicolons before and after the path, such as: D:\newdream\mysql\mysqlserver\bin;)


#4. Return to the installation directory, add a new notepad in the directory, change the name to my, and change the suffix to .ini


5. Open my.ini in Notepad and add the following content:


[mysqld]
port = 3306
basedir=D:/newdream/mysql/mysqlserver
datadir=D:/newdream/mysql/mysqlserver/data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8
Copy after login

Note: after basedir and datadir The path is the path of your own directory

My path is D:/newdream/mysql/mysqlserver;

Be sure to change the "\" in the path to "/"

6. Open the cmd window as an administrator

Enter the following path to change the execution location:

cd /d (安装目录下bin目录的路径)
如:cd /d D:\newdream\mysql\mysqlserver\bin
Copy after login

7. Enter the following command to install the sql service:

mysqld -install
Copy after login

After executing the command, a prompt Service successfully installed will pop up. It means the installation is successful (if the cmd is not opened with the administrator, this will not pass)

8. Enter the following command to initialize the sql service:

mysqld --initialize-insecure --user=mysql
Copy after login

After executing the command, a data file will be generated in the directory and Create root user

9. Enter the following command to start sql:

net start mysql
Copy after login

After execution, the following prompt will appear:

MySQL服务正在启动..
MySQL服务已经启动成功。
Copy after login

10. Enter the following command to enter sql to change the password

mysqladmin -u root -p password
Copy after login

Enter password pops up:

At this time, the system has no password, you can directly return car, then set a new password and enter it again. Password setting is completed.

11. Enter mysql -u root -p password to enter sql.

The above is the detailed content of Detailed steps for decompressing and installing mysql (pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
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