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

CentOS7.5 installation tutorial of MySQL

1. First check whether the system has mysql insta...

How to modify the initial password of MySQL on MAC

Problem description: I bought a Mac and installed...

MySQL dual-master (master-master) architecture configuration solution

In enterprises, database high availability has al...

Basic implementation method of cross-component binding using v-model in Vue

Hello everyone, today we will talk about how to u...

MySQL 8.0.24 version installation and configuration method graphic tutorial

This article records the installation and configu...

Core skills that web front-end development engineers need to master

The content involved in Web front-end development...

JavaScript setinterval delay one second solution

When using setinterval, it is found that it will ...

Implementation of breakpoint resume in Node.js

Preface Normal business needs: upload pictures, E...

The difference between ID and Name attributes of HTML elements

Today I am a little confused about <a href=&quo...

Textarea tag in HTML

<textarea></textarea> is used to crea...

React native realizes the monitoring gesture up and down pull effect

React native implements the monitoring gesture to...

Vue's guide to pitfalls using throttling functions

Preface In a common business scenario, we need to...

Detailed explanation of HTML basics (Part 1)

1. Understand the WEB Web pages are mainly compos...