Using command line to install MySQL 5.6 in Windows 10

Hello World 2021-05-26 AM 152℃ 0条
  • Current Environment:Windows 10 LTSC
  • Download MySQL (Download MySQL (version suitable for Windows). I use mysql-5.6.51-winx64 here. You can download it from the official website or my software park )
  • Unzip the MySQL package to the directory you want to install. I use disk D: here
  • Modify the installation path in my.ini
  • Open command line in administrator mode
    The demo command is

D:
cd mysql/bin
mysqld --install

  • Enter after installation net start mysql
  • Configure MySQL environment variables :Open administrator command line input setx /M PATH "%PATH%;D:\Program Files (x86)\mysql-5.6.51-winx64\bin;"
  • No password by default after successful installation
  • Enter mysql -uroot -p to log in
  • The first login requires the following SQL statements
USE mysql;
SHOW TABLES;
SELECT HOST,user FROM mysql.user;
SELECT HOST,user,PASSWORD FROM mysql.user;
UPDATE mysql.user SET PASSWORD=PASSWORD('123') WHERE user='root';
FLUSH PRIVILEGES;
  • Replace 123 with the root password you want to set
  • OK, we've built it. Let's use it
标签: mysql, command line

非特殊说明,本博所有文章均为博主原创。

上一篇 没有了
下一篇 rclone

评论啦~