当计算机系统提示丢失MSVCR120.dll时,需要安装Microsoft Visual C++ 2013 Redistributable Package。
MSVCR120.dll是Microsoft Visual C++ Redistributable Package的一部分,特别是与Visual Studio 2013版本相关。这个DLL文件对于许多使用C++编写的应用程序来说是必需的,因为它提供了运行时支持,包括内存管理、标准C/C++函数库等关键功能。
在解决MSVCR120.dll丢失的问题时,最直接的方法是从微软官方网站下载并安装相应版本的Microsoft Visual C++ Redistributable Package。根据操作系统的位数(32位或64位),选择合适的安装包进行下载和安装。
C:\Windows\system32>mysqld --initialize
2024-09-28T08:20:31.234808Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2024-09-28T08:20:31.234808Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'E
RROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will
be merged with strict mode in a future release.
2024-09-28T08:20:31.234808Z 0 [ERROR] --initialize specified but the data direct
ory has files in it. Aborting.
2024-09-28T08:20:31.234808Z 0 [ERROR] Aborting
如果要再次执行,需要把Data目录里的内容清空
C:\Windows\system32>mysqld -install mysql57
Service successfully installed.
C:\Windows\system32>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.