Surface strongest one-click install MySQL installation, you believe it or not is finished I will give you installed! Various solutions have attached Mysql installation failure (what you install fail? Come see this)

The first step to download my archive
links : https://pan.baidu.com/s/1EE40dU0j2U1d-bAfj7TeVA
extraction code: n25c
After you copy the contents of this open Baidu network disk phone App, the operation more convenient oh
the second step to extract D盘all into perspective diagram.
Here Insert Picture Description
The third step is opened MySQL文件夹, is D盘that
Here Insert Picture Description
the fourth step an administrator to run 环境变量.bat
Here Insert Picture Description
Here Insert Picture Description
away with.
Enter mysql -uroot -ptry
password do not enter, skip.
Here Insert Picture Description

The installation is complete





problem solved:

If not, the task manager (ctrl + alt + del) find what the service

Here Insert Picture Description
Here Insert Picture Description

Root directory to find my.ini
Here Insert Picture Description
delete the second row

[mysqld]
# skip-grant-tables
# 如果不输入密码报错,删除上一句的“#”然后参考前面修改密码。
# 设置3306端口
port=3306

# 设置mysql的安装目录
basedir=D:\\Mysql\\mysql-8.0.19-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\\Mysql\\mysql-8.0.19-winx64\\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8

Try again

If there is a lack of vcruntime140.dll

VC ++ is not supported because of
to the official website to download a
https://support.microsoft.com/zh-cn/help/2977003/the-latest-supported-visual-c-downloads


If mysql service can not function properly, it stopped directly after opening.

High probability that data initialization failed, that did not complete the operation shut down .bat
delete the data file in the root directory of mysql folder, and then manually run the following code at run cmd.

mysqld --initialize-insecure --user=mysql
mysqld -install

workbench installation

mysql workbench is the official database management software, relatively speaking, very full functionality.

Download link is this https://dev.mysql.com/downloads/file/?id=492434
directly click to download, the download is busy, you can copy the Thunder download

change Password

Finally Finally, because my configuration is skipped password so you can enter directly, but if necessary, refer to change the password.
1. Run cmd, input mysql -u root -pappears password: Enter directly enter.

2 into the mysql database:

use mysql

promptDatabase changed

3. Set the new password to the root user:

update user set password=password("123456") where user="root";

Do not forget punctuation

提示:Query OK, 1 rows affected (0.04 sec)Rows matched: 1 Changed: 1 Warnings: 0

4. Refresh Database

flush privileges;

Tip: Query OK, 0 rows affected (0.01 sec)

5 Exit mysql:

exit

then:

Root directory to find my.ini
Here Insert Picture Description
delete the second row
Here Insert Picture Description

General Solution

If the problem is not resolved, then open the log file. In the data in the data root directory, a .errfile to open it, you know what the real reason can not run yes.

mysql-8.0.19-winx64\data\计算机名.err

Environment Variables .bat

@echo off
set My_PATH=D:\MySQL\mysql-8.0.19-winx64\bin 
 goto start
      =  上面的path改成自己mysql的安装目录下的bin的路径
     :start
set PATH=%PATH%;%My_PATH%
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" /t REG_EXPAND_SZ /d "%PATH%" /f

mysqld --initialize-insecure --user=mysql
mysqld -install
 goto start2
      =  mysql的初始化数据库,和安装
     :start2
pause

If you run a problem, you can delete the goto statement

my.ini

[mysqld]
# skip-grant-tables
# 如果不输入密码报错,删除上一句的“#”然后参考前面修改密码。
# 设置3306端口
port=3306

# 设置mysql的安装目录
basedir=D:\\Mysql\\mysql-8.0.19-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\\Mysql\\mysql-8.0.19-winx64\\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8
Published 612 original articles · won praise 282 · views 50000 +

Guess you like

Origin blog.csdn.net/weixin_43627118/article/details/104911652