Unable to launch MySQL

Asked 2 years ago, Updated 2 years ago, 367 views

I'm sorry to disturb you every time.I look forward to working with you again this time.

Currently, I deployed Ravel to Sakura VPS and tried to boot it up.

SQLSTATE [HY000][2002] Connection refused (SQL:select count(*)as aggregate)


because it shows that you are not connected to MySQL. When I restarted MySQL with the following command, I received the following error:

$sudo service mysqld restart

Job for mysqld.service failed because the control process expired with error code.
See "systemctl status mysqld.service" and "journalctl-xe" for details

When I looked it up online, there were many opinions that it might be a problem around authority.
As I was familiar with the partitions, I checked the log and found the following output:

/var/log/mysqld.log

2021-06-04T16:52:24.795768Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_3.ibt'permission error, can't delete!
2021-06-04T16:52:24.795778Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_4.ibt'permission error, can't delete!
2021-06-04T16:52:24.795787Z0 [Warning][MY-01257373][InnoDB]'./#innodb_temp/temp_5.ibt'permission error, can't delete!
2021-06-04T16:52:24.795796Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_6.ibt'permission error, can't delete!
2021-06-04T16:52:24.795805Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_7.ibt'permission error, can't delete!
2021-06-04T16:52:24.795815Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_8.ibt'permission error, can't delete!
2021-06-04T16:52:24.795827Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_9.ibt'permission error, can't delete!
2021-06-04T16:52:24.795838Z0 [Warning][MY-012573][InnoDB]'./#innodb_temp/temp_10.ibt'permission error, can't delete!
2021-06-04T16:52:24.811659Z 0 [ERROR] [MY-012592] [InnoDB] Operating system error number 13 in a file operation.
2021-06-04T16:52:24.811716Z0 [ERROR] [MY-012595] [InnoDB] The error means mysqld does not have the access rights to the directory.
2021-06-04T16:52:24.819156Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld —Shutdown complete (mysqld 8.0.25) MySQL Community Server - GPL.

The log says that it was shut down due to a problem around permissions.As far as I can think of it, I thought it might have affected me when I changed the permission to issue Ravel's access key.
Before I changed the part, I was able to connect properly and insert, so I was able to check the operation.
When I checked the date and time of the error, I found out that it was a permission change since the insert operation was completed.
The following permissions have been changed.

 drwxr-xr-x2 root users 40 Jun 504:12 mysqld

Change Permissions, Run

chown-R mysql:mysql/var/run/mysqld
$ sudo service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Job for mysqld.service failed because the control process expired with error code

However, changing permissions does not change the error.

Approximate time series

  • About 24:00 on June 3, 2022
    Determined if index.php can connect to mysql.→You can connect to databases, tables, and insert

  • About 24:30 on June 3, 2022
    Modified the .env file to launch the LaLabel project.
    phpartisan migrate Success-free and successful.
    phpartisan key:generate but change permissions in /var/www/html to access .env files because they are denied permission

  • Around the evening of June 4, 2022
    Error in mysqld.log

Around 24:00 on June 3, 2022
Determined if index.php can connect to mysql.→You can connect to databases, tables, and insert

Around 24:30 on June 3, 2022
Modified the .env file to launch the LaLabel project.
phpartisan migrate Success-free and successful.
phpartisan key:generate but change permissions in /var/www/html to access .env files because they are denied permission

Around the evening of June 4, 2022
Error in mysqld.log

I looked it up online and did everything I could, but I couldn't solve it.
I would appreciate it if you could give me some advice.

mysql centos

2022-09-30 21:58

1 Answers

You may want to check the permissions of the datadir directory.

You will find the actual directory name in mysqld --help-v | grep datadir.


2022-09-30 21:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.