时间:2021-07-01 10:21:17 帮助过:2人阅读
如果安装目录为
C:\Program Files\MySQL\MySQL Server 5.6
增加环境变量
MYSQL_HOME=C:\Program Files\MySQL\MySQL Server 5.6
path中添加 %MYSQL_HOME%\bin
安装目录中复制my_default.ini文件副本为my.ini,在文件中配置如下信息
[mysqld]
basedir = C:/Program Files/MySQL/MySQL Server 5.6
datadir = C:/Program Files/MySQL/MySQL Server 5.6/data
port = 3306
[mysql]
default-character-set=utf8
[WinMySQLAdmin]
Server=C:/Program Files/MySQL/MySQL Server 5.6/bin/mysqld.exe
管理员权限打开Cmd
mysqld -install //安装mysql服务 (--remove 为卸载服务)
net start mysql //启动mysql服务
修改root密码
mysql -u root -p //以root进入mysql
mysql> set password for root@localhost = password(‘1234‘); //修改root密码为1234
Win7 mysql5.6配置
标签: