Home >Database >Mysql Tutorial >Detailed steps for decompressing and installing mysql (pictures and text)
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
[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=utf8Note: after basedir and datadir The path is the path of your own directory
My path is D:/newdream/mysql/mysqlserver;
Enter the following path to change the execution location:
cd /d (安装目录下bin目录的路径) 如:cd /d D:\newdream\mysql\mysqlserver\bin7. Enter the following command to install the sql service:
mysqld -installAfter 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=mysqlAfter 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 mysqlAfter execution, the following prompt will appear:
MySQL服务正在启动.. MySQL服务已经启动成功。10. Enter the following command to enter sql to change the password
mysqladmin -u root -p passwordEnter 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.
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!