search
HomeDatabaseMysql TutorialSolution to the initialization error when installing mysql5.7 in centos6.5 using rpm package

This article mainly introduces the solution to the initialization error of mysql5.7 when installing the rpm package in centos6.5. Friends in need can refer to it

1. Upload rz to the server and decompress


rz
[root@mini2 upload]# tar -xvf mysql-5.7.19-1.el6.i686.rpm-bundle.tar

2. Install rpm package


rpm -ivh mysql-community-common-5.7.19-1.el6.i686.rpm
rpm -ivh mysql-community-libs-5.7.19-1.el6.i686.rpm 
rpm -ivh mysql-community-libs-compat-5.7.19-1.el6.i686.rpm
rpm -ivh mysql-community-client-5.7.19-1.el6.i686.rpm
rpm -ivh mysql-community-server-5.7.19-1.el6.i686.rpm

Note: If it is not brand new Installation, but installed with rpm before, failed to install, and then uninstalled, the following situation may occur:

When executing rpm -ivh mysql-community-server-5.7.19 -1.el6.i686.rpm, if the following output appears:

It is most likely because the data directory has not been cleared. Let's go down to manual initialization and execute the following command:


[root@mini2 upload]# mysqld --initialize --user=mysql  
2017-08-29T05:22:18.750237Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-08-29T05:22:18.754943Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-08-29T05:22:18.755064Z 0 [ERROR] Aborting

I found that an error was reported. I searched Baidu with the error message and found that I needed to clear the data directory:

As seen from the official documentation, the data directory Location:

Then clear it and try again.


[root@mini2 upload]# rm -rf /var/lib/mysql/*

Next initialize:


mysqld --initialize --user=mysql

Next start mysql:


[root@mini2 upload]# service mysqld start

Starting mysqld:                                                                                                                                                                                Clean, you should intuitively log in with the new password at the end)

[root@mini2 upload]# grep 'temporary password' /var/log/mysqld.log
2017-08-29T05:00:02.613275Z 1 [Note] A temporary password is generated for root@localhost: tzqjMvkHH3+C
2017-08-29T05:31:51.340338Z 1 [Note] A temporary password is generated for root@localhost: Adgwggdr%1e2

4. Login


[root@mini2 upload]# mysql -uroot -p
My login here is ok, the password is Adgwggdr%1e2


5. Change the password and allow client login from other machines

ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option

Summary

The above is the detailed content of Solution to the initialization error when installing mysql5.7 in centos6.5 using rpm package. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Windows 无法初始化此硬件的设备驱动程序(代码 37)修复Windows 无法初始化此硬件的设备驱动程序(代码 37)修复Apr 14, 2023 pm 01:22 PM

当 Windows 检测到设备的驱动程序不兼容或损坏时,它无法对其进行初始化。设备停止工作,当用户调查时,“ Windows 无法为此硬件初始化设备驱动程序(代码 37) ”错误消息显示在“设备状态”窗格中。解决这个问题很容易,你可以很容易地做到这一点。修复 1 – 扫描计算机您可以扫描设备以查找任何硬件更改。Windows 最终将检查并检测任何驱动程序更改。1.您只需右键单击“ Windows键”并点击“设备管理器”。2. 当设备管理器出现在您的系统上时,单击菜单栏上的“操作”。3. 在这里,

修复: Windows 无法初始化此硬件的设备驱动程序修复: Windows 无法初始化此硬件的设备驱动程序Apr 13, 2023 pm 01:19 PM

错误代码 37 表示 Windows 检测到设备驱动程序存在问题,无法启动硬件设备。这意味着您的系统上未正确安装软件设备驱动程序,或者您尝试使用的硬件与 Windows 不兼容。您已经知道驱动程序对于设备的平稳运行至关重要,因此如果您要使用硬件设备,则需要立即解决此错误。在本文中,我们将向您展示绕过此错误的各种方法。是什么原因导致 Windows 错误代码 37?当您得到 Windows 无法初始化此硬件的设备驱动程序时。(代码 37) 消息,它可能由几个问题引起,包括:兼容性问题 – 当您将硬

动态链接库初始化例程失败什么办动态链接库初始化例程失败什么办Dec 29, 2023 am 10:30 AM

解决办法:1、重新安装应用程序;2、修复或重新安装DLL;3、系统还原或检查点恢复;4、使用系统文件检查器(SFC)扫描;5、检查启动项和服务;6、使用工具;7、查阅官方文档或论坛;8、考虑安全软件;9、查看事件查看器;10、寻求专家帮助等等。

win7怎么初始化电脑win7怎么初始化电脑Jan 07, 2024 am 11:53 AM

win7系统是一款非常优秀的高性能系统,在对win7的不断使用中有很多的朋友都在问win7怎么初始化电脑!今天小编为大家带来的就是win7电脑恢复出厂设置的操作方法。win7怎么初始化电脑的相关信息:图文详解操作步骤:1、打开“开始菜单”,然后进入。2、点击进入左侧底部的设置。3、在Win10更新和恢复设置的界面中,选择。4、点击“删除所有内容并重新安装Windows”下方的。5、可以看到如下“初始化”设置了,然后点击。6、进入“你的电脑有多个驱动器”设置选项,这里有和两个选项,可以根据情况选择

修复无法初始化PC上的图形系统错误修复无法初始化PC上的图形系统错误Mar 08, 2024 am 09:55 AM

许多游戏玩家遇到了游戏无法初始化图形系统的令人沮丧的问题。这篇文章将深入探讨这个问题背后的常见原因,并找到简单而有效的解决方案,让你重新回到棋盘上,并在任何时间内通过关卡。因此,如果你在过山车大亨、刺客信条、托尼·霍克的职业溜冰者等中收到无法初始化图形系统错误信息,请遵循本文中提到的解决方案。初始化错误无法初始化图形系统。不支持显卡。修复无法初始化图形系统错误信息要解决过山车大亨、刺客信条、托尼·霍克的专业溜冰者等游戏中的无法初始化图形系统错误,可以尝试执行以下解决方法:更新显卡驱动程序在兼容模

如何重置win7网络设置如何重置win7网络设置Dec 26, 2023 pm 06:51 PM

win7系统是一款非常优秀的高性能系统,最近一段时间里有很多win7系统的小伙伴们都在找win7怎么初始化网络设置的方法,今天小编为大家带来的就是win7电脑网络初始化的详细教程一起来看看吧。win7怎么初始化网络设置的详细教程:图文操作步骤:1、点“开始”菜单,找到并打开“控制面板”,进去之后再点“网络和共享中心”。2、然后找到并点开“更改适配器设备”。3、接下来,在打开的窗口中,鼠标右键点击“本地连接”,再点“属性”。4、打开之后,就找到“Internet协议版本(TCP/IPv4)”,再双

C++程序初始化字典C++程序初始化字典Sep 09, 2023 pm 07:01 PM

C++在同名的字典方面与Python不同,但它具有相似功能的相同数据结构。C++支持映射,可在STL类std::map中使用。映射对象在每个条目中包含一对值,一个是键值,另一个是映射值。键值用于在映射中搜索和唯一标识条目。而映射值不一定是唯一的,键值在映射中必须始终是唯一的。让我们看一下如何使用映射。首先,让我们看看如何在C++中定义一个映射数据结构。语法#includemap<data_type1,data_type2>myMap;让我们举个例子,看看如何做到这一点−示例#incl

修复:新 SSD 未在 Windows 11、10 中显示修复:新 SSD 未在 Windows 11、10 中显示Apr 14, 2023 pm 02:52 PM

SSD 彻底改变了技术世界。这些数据存储解决方案凭借其超快和无与伦比的读/写速度,让每个用户都渴望在其中安装系统操作系统。但是,如果您的新 SSD 没有出现在您的 Windows 设备上怎么办?这是插入系统的全新 SSD 可能面临的一个典型问题。不用担心。我们刚刚得到了正确的解决方案,您所要做的就是按照这些步骤操作,SSD 将立即回到您的文件资源管理器。解决方法——1. 检查SSD的连接。如果您使用的是 USB 集线器,请将 SSD 直接连接到您的系统。查看 SSD 的连接器是否有任何物理缺陷。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.