当前位置:Gxlcms > 数据库问题 > MySQL Windows 下的安装

MySQL Windows 下的安装

时间:2021-07-01 10:21:17 帮助过:39人阅读

[MASTER主机]

服务注册 mysqld install MySQL --defaults-file="D:\IDE\mysql-5.7.20-winx64\my.ini"
修改注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL
初始化 mysqld --initialize
启动 net start mysql

==================================================================================
由于MYSQL5.6开始ROOT就是随机密码,所以需要修改密码
net stop mysql
cd "C:\Program Files (x86)\MySQL\MySQL 5.7\bin"
start mysqld --skip-grant-tables
mysql -ANe"update mysql.user set authentication_string=PASSWORD(‘mynewpassword‘) where user=‘root‘"
mysqladmin shutdown
net start mysql
mysql -uroot -p
Enter password: (enter the password ‘mynewpassword‘ and hit <Enter>)
==================================================================================

卸载:
移除服务 mysqld remove
sc delete MySQL

reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL" /f

 

[SLAVE从机]

mysqld install MySQL-SLAVE --defaults-file="D:\IDE\mysql-5.7.20-winx64-slave\my.ini"

MySQL Windows 下的安装

标签:auth   upd   update   new   服务注册   def   rem   art   file   

人气教程排行