1.将安装包解压到没有中文的目录文件夹下,例如:D:\workspace\mysql-5.6.25-win32。
2.打开cmd窗口,进入到安装目录下,
C:\Windows\system32>d:
D:\>cd D:\workspace\mysql-5.6.25-win32\bin
3.输入“mysqld -install”,此语句为安装mysql。(移除为“mysqld -remove”)
D:\workspace\mysql-5.6.25-win32\bin>mysqld -install
4.安装成功后,输入“net start mysql”,启动服务,("net stop mysql"停止服务 )
D:\workspace\mysql-5.6.25-win32\bin>net start mysql
5.成功后登录时输入“mysql -u root -p”首次安装root的密码为空,回车即可
D:\workspace\mysql-5.6.25-win32\bin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
5.退出输入“exit”或“quit”即可。