Solution to the problem that the configuration file my.cnf in MySQL cannot be started due to permission issues

Solution to the problem that the configuration file my.cnf in MySQL cannot be started due to permission issues

This article mainly introduces the relevant solution process for the failure to start the MySQL configuration file my.cnf due to permission problems. It is shared for your reference and learning. Let's take a look at the detailed introduction below:

Problem Description

MySQL cannot start and reports the following error:


Problem Analysis

Checking the MySQL error log, I found the following error (prompting that the host table of the MySQL library cannot be opened):


View the /etc/my.cnf configuration file:


Go to the directory where the MySQL database is located to check whether the table exists:


I found that the host table of the MySQL library does exist, so why does it say that it does not exist?

The problem should be with the /etc/my.cnf file. You can also see the warning message from the first screenshot (/etc/my.cnf is ignored)
Check the file permissions:


The original file permission was set to 777, which was ignored by MySQL due to security issues. So when I queried the default database storage path, I found that there was no host table for the MySQL library, which caused the startup to fail:


Solution

Change the permissions of /etc/my.cnf to 644, and then start MySQL:

Summarize

The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM.

You may also be interested in:
  • Use shell scripts to add, delete, modify, and check mysql and configure my.cnf
  • Solve the problem of no my.cnf file in /etc when installing mysql on Linux
  • Introduction to /etc/my.cnf parameters in MySQL 5.7
  • MySQL service performance optimization—my.cnf_my.ini configuration instructions (16G memory)
  • Solution to the ineffectiveness of modifying MySQL my.cnf configuration
  • MySQL 5.5.x my.cnf parameter configuration optimization details
  • Detailed explanation of MySQL configuration file my.cnf optimization (mysql5.5)
  • MySQL performance optimization road --- modify the configuration file my.cnf
  • MariaDB (MySQL branch) my.cnf configuration file Chinese annotated version
  • MySQL configuration file my.cnf parameter optimization and Chinese detailed explanation
  • Detailed explanation of MySQL configuration file my.cnf in Chinese, with sharing of MySQL performance optimization methods
  • Comparison of the Chinese version of the MySQL configuration file my.cnf
  • Detailed analysis of MySQL configuration parameters my.ini/my.cnf
  • Details of the order in which MySQL reads my.cnf

<<:  Basic knowledge of load balancing and a simple example of load balancing using nginx

>>:  Vue based on Element button permission implementation solution

Recommend

MySQL Series 14 MySQL High Availability Implementation

1. MHA ​By monitoring the master node, automatic ...

Linux automatic login example explanation

There are many scripts on the Internet that use e...

Page Refactoring Skills - Content

Enough of small talk <br />Based on the lar...

JavaScript to show and hide images

JavaScript shows and hides pictures, for your ref...

JavaScript implements password box verification information

This article example shares the specific code of ...

How to add docker port and get dockerfile

Get the Dockerfile from the Docker image docker h...

A brief discussion on JS packaging objects

Table of contents Overview definition Instance Me...

The process of installing SVN on Ubuntu 16.04.5LTS

This article briefly introduces the process of se...

HTML scroll bar textarea attribute setting

1. Overflow content overflow settings (set whether...

IE6 BUG and fix is ​​a preventive strategy

Original article: Ultimate IE6 Cheatsheet: How To...

Handwriting implementation of new in JS

Table of contents 1 Introduction to the new opera...

Practical method of upgrading PHP to 5.6 in Linux

1: Check the PHP version after entering the termi...

Interpretation of CocosCreator source code: engine startup and main loop

Table of contents Preface preparation Go! text St...

How to configure whitelist access in mysql

Steps to configure whitelist access in mysql 1. L...