Steps to install mysql in cmd:
1. Download the installation package
Website: https://dev .mysql.com/downloads/mysql/
##2. Install mysql
1 , Extract the downloaded installation package to the specified directory (remember the decompression address) 2. Open the cmd window as an administrator and switch the directory to the bin directory where the file is extracted. 3. Use themysqld install command to install
mysqld --initialize-insecure --user=mysql
net start mysql
mysql -u root -p
update user set password=password(“123456”) where user=“root”;
##7 , Refresh permissions:
flush privileges;
8, Exit:
quit;
This configuration method is applicable to versions below MySQL 5.7. Versions 5.7 and above lack the data directory compared to previous versions, so they are not suitable for this installation method.
Related learning recommendations:java basic tutorial
The above is the detailed content of How to install mysql in cmd?. For more information, please follow other related articles on the PHP Chinese website!