I haven't installed mysql for a long time. I will install it today. It took a long time to install it, and I will record it
1. Download the mysql free installation version and extract it to a folder (assuming F:\Program Files\mysql-5.6.16-winx64)
2. Add the environment variable of MYSQL_HOME: F:\Program Files\mysql-5.6.16-winx64
3. Create a file F:\Program Files\mysql-5.6.16-winx64\my.ini with the following contents
4. Open a cmd in administrator mode and enter F:\Program Files\mysql-5.6.16-winx64\bin
5、执行 mysqld --install mysql --defaults-file=F:\Program Files\mysql-5.6.16-winx64\my.ini
6. Execute net start mysql to start mysql
7. When you execute mysql -uroot -p and ask for a password, press Enter. If the installation is successful, you can connect to mysql
other:
1. Uninstall the mysql service
a) 管理域权限cmd进入F:\Program Files\mysql-5.6.16-winx64\bin,执行mysqld -remove
b) 或者在命令行里面执行sc delete mysql
2、有其他问题,就先卸载mysql服务(上面两个命令都执行一次),然后再重新安装,如果重新安装再出错误重启下电脑再重新安装