新电脑配置安装MySQL解压版

下载地址:(注意下载可能需要ORACLE账号)

mysql下载地址:https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.19-winx64.zip

官网如果不想去下可以参考这篇文章:https://yq.aliyun.com/articles/710422

补充个地址:我自己上传的,避免你懒得高百度账号。

https://download.csdn.net/download/yejin191258966/12275233

说下需要注意的地方:

1、提示VCRUNTIME140.dll问题。

因为我的电脑是新机。mysqld -install 安装的时候提示,

由于找不到VCRUNTIME140.dll,无法继续执行代码问题解决

解决办法:

你缺少那个组件,安装vc2015还是解决不了的,要下载VCRUNTIME140.DLL,地址:https://cn.dll-files.com/vcruntime140.dll.html 解压复制到C:\Windows\System32\这里就行了 删除举报回复

谢谢:@ITwlcsdn

进入这个网址,你下载对应需要的就可以了。我这边下载的是最新的。

https://download.visualstudio.microsoft.com/download/pr/8c211be1-c537-4402-82e7-a8fb5ee05e8a/B6C82087A2C443DB859FDBEAAE7F46244D06C3F2A7F71C35E50358066253DE52/VC_redist.x64.exe

2、第二个问题mysqld --initialize --user=mysql --console 出现一大堆信息。

mysqld: Can't create directory 'D: ofts\work\mysql-8.0.19-winx64\data\' (OS errno 2 - No such file or directory)
2020-03-27T07:04:07.829421Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-03-27T07:04:07.829609Z 0 [System] [MY-013169] [Server] D:\softs\work\mysql-8.0.19-winx64\bin\mysqld.exe (mysqld 8.0.19) initializing of server in progress as process 4176
2020-03-27T07:04:07.829821Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'D:\softs\work\mysql-8.0.19-winx64\bin\ ofts\work\mysql-8.0.19-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2020-03-27T07:04:07.831176Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2020-03-27T07:04:07.831227Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2020-03-27T07:04:07.833194Z 0 [ERROR] [MY-013236] [Server] The designated data directory D: ofts\work\mysql-8.0.19-winx64\data\ is unusable. You can remove all files that the server added to it.
2020-03-27T07:04:07.893020Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-03-27T07:04:07.899194Z 0 [System] [MY-010910] [Server] D:\softs\work\mysql-8.0.19-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.19)  MySQL Community Server - GPL.

这个问题应该是无法自动创建data文件导致的。路径的写法问题。

D:\softs\work\mysql-8.0.19-winx64\data我一开始是直接复制的。

要改为D:/softs\work/mysql-8.0.19-winx64/data

 

数据库管理工具。我自己用sqlyog。下载http://soft.onlinedown.net/soft/24926.htm

自己下载安装就好了。

 

密码问题:如果你安装的是MySQL8.0以上的版本

D:\softs\work\mysql-8.0.19-winx64\bin>mysqld --initialize --console
2020-03-27T08:33:39.923005Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-03-27T08:33:39.923093Z 0 [System] [MY-013169] [Server] D:\softs\work\mysql-8.0.19-winx64\bin\mysqld.exe (mysqld 8.0.19) initializing of server in progress as process 9236
2020-03-27T08:33:39.924533Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2020-03-27T08:33:39.924555Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2020-03-27T08:33:41.620309Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 6SVho;S%5tHF

这个密码会用得到。下面的操作参考:https://www.cnblogs.com/SunAutumn/p/9155977.html

下一步应该就是:注册或者启动服务器。

没注册就注册下:mysqld -install

启动mysql命令:net start install

登录mysql的命令:mysql -uroot -p

密码:6SVho;S%5tHF

改密码:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '修改的密码';

 

 

你可能感兴趣的:(数据库相关,mysql,数据库)