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

Linux uses iptables to limit multiple IPs from accessing your server

Preface In the Linux kernel, netfilter is a subsy...

Vue.js performance optimization N tips (worth collecting)

Table of contents Functionalcomponents Childcompo...

Differences between ES6 inheritance and ES5 inheritance in js

Table of contents Inheritance ES5 prototype inher...

CentOS uses local yum source to build LAMP environment graphic tutorial

This article describes how to use the local yum s...

Detailed steps for smooth transition from MySQL to MariaDB

1. Introduction to MariaDB and MySQL 1. Introduct...

A complete list of commonly used HTML tags and their characteristics

First of all, you need to know some characteristi...

Detailed explanation of the use and precautions of crontab under Linux

Crontab is a command used to set up periodic exec...

25 Vue Tips You Must Know

Table of contents 1. Limit props to type lists 2....

Summary of 4 ways to add users to groups in Linux

Preface Linux groups are organizational units use...

CSS screen size adaptive implementation example

To achieve CSS screen size adaptation, we must fi...

Do you know how to optimize loading web fonts?

Just as the title! The commonly used font-family l...

Tutorial on installing MySQL 8.0.11 under Linux

1. Go to the official website to download the ins...

The ultimate solution for writing bash scripts with nodejs

Table of contents Preface zx library $`command` c...

How to use ElementUI pagination component Pagination in Vue

The use of ElementUI paging component Pagination ...