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

How to implement nginx smooth restart

1. Background During the server development proce...

MySQL variable principles and application examples

In the MySQL documentation, MySQL variables can b...

CentOS7 deploys version 19 of docker (simple, you can follow it)

1. Install dependency packages [root@localhost ~]...

Native JS to implement real-time clock

Share a real-time clock effect implemented with n...

ReactHooks batch update state and get route parameters example analysis

Table of contents 1. How to update in batches Con...

Let's talk about the storage engine in MySQL

Basics In a relational database, each data table ...

Detailed explanation of mysql integrity constraints example

This article describes the MySQL integrity constr...

Detailed tutorial for installing influxdb in docker (performance test)

1. Prerequisites 1. The project has been deployed...

Detailed analysis of javascript data proxy and events

Table of contents Data Brokers and Events Review ...

Do you know all 24 methods of JavaScript loop traversal?

Table of contents Preface 1. Array traversal meth...

Uninstalling MySQL database under Linux

How to uninstall MySQL database under Linux? The ...

How to bypass unknown field names in MySQL

Preface This article introduces the fifth questio...

js object-oriented method to achieve drag effect

This article shares the specific code for impleme...