Tag Archives: MySQL Startup error

MYSQL Startup Error: [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to

When using PHP to query MySQL database, the query speed is very slow. So I repeated the MySQL service on the server. As a result, the MySQL link was not available. It took several hours to solve it. Here is a summary of the solution

1. Error reporting

When I input the following startup command to start, I found that it could not be started

service mysqld start

MariaDB/MySQL cannot be started. The following error is reported in the log file:

[ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables

[ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with –with-aria-tmp-tables
Error Messages:

2. Reason

PLESK Upgrade Error,mysql Connect the database Error:


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
...
Trying to start service mysql... failed
...
server.example.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
server.example.com systemd[1]: Failed to start MariaDB 10.2.13 database server.
server.example.com systemd[1]: Unit mariadb.service entered failed state.
server.example.com systemd[1]: mariadb.service failed.

3. Solution

SSH connect to the server and enter the data directory, you can usually set the save path in my.cnf, and you can find centos7 9 + MariaDB path is /etc/MySQL/MariaDB conf.d/server.cnf):

Remove Aria_log_Control file:

cd /var/lib/mysql/
# Please replace aria_log_control, in case to report an error when you delete it.
mv aria_log_control aria_log_control.old
# restart
service mysqld restart 

If you can start, you can ignore the following commands and update Plesk:

plesk installer --select-release-current --reinstall-patch --upgrade-installed-components

[Solved] MYSQL Startup Error: server PID file could not be found

[root@centos var]# service mysqld stop

MySQL manager or server PID file could not be found![ FAILED]

Delete superfluous

Notes

#log-bin=mysql-bin

If you kill the process, you still can’t

If the log path is not specified, you can see the error information in the localhost.err file in/data/MySQL

If there is no dead process in the thread, you can first look at the service MySQL status to see the status and delete the superfluous things according to the prompts

Go to/data/MySQL, which is your database directory, and delete the unnecessary items, including localhost. Err and other indexes

If you restart service mysql start several times, you can restart successfully

How to Solve MYSQL Startup Error: “MySQL Daemon failed to start”

On CentOS, start MySQL with the command: Service mysqld restart

# service mysqld restart
Stopping mysqld:                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

Enter the MySQL related directory to view:

# cd /var/lib/mysql/
# ls 
hhw_global  ibdata1  ib_logfile0  ib_logfile1  localhost.localdomain.err  mysql  mysql.sock  test

To view the server startup log:

# tail localhost.localdomain.err 
190610 20:16:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190610 20:16:57 [ERROR] You need to use --log-bin to make --binlog-format work.
190610 20:16:57 [ERROR] Aborting

190610 20:16:57 [Note] /usr/libexec/mysqld: Shutdown complete

190610 20:16:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

As you can see, the two lines reported an error saying that the — binlog format option was turned on, but bin log was not turned on, so the MySQL process could not be started. Use the following command to view the location of the configuration:

# mysqld --verbose --help|grep -A 1 'Default options'

Or:

# mysql --verbose --help|grep -A 1 'Default options'

Query results:

# mysql --verbose --help|grep -A 1 'Default options'
Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf

Find the corresponding my.cnf, modify the corresponding configuration item, and restart mysqld service

How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)

After installing and initializing MySQL database under Linux, use mysqld_ Safe starts the MySQL database, as shown below, the startup fails

[ root@SVNServer bin]# ./mysqld_ safe –user=mysql&

Or

[ root@SVNServer bin]#/etc/init.d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/AY14020816093477605eZ.pid).

Restart MySQL will throw the above red font error

You can only see the specific reasons for the failure of starting mysql. You need to check the. Err file in the database directory and the. Err file. The contents are as follows:

140726 00:18:10 mysqld_ safe mysqld from pid file /data/mysql/AY14020816093477605eZ.pid ended

140726 00:31:19 mysqld_ safe Starting mysqld daemon with databases from /data/mysql

/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.index’ not found (Errcode: 13)

140726 0:31:19 [ERROR] Aborting

140726 0:31:19 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

This error report is marked in red, errcode13, which is generally a permission problem. Whether MySQL users have permission to write all the files in the database directory, check the permissions, and modify the permissions of users and user groups in the MySQL directory

chown -R mysql:mysql /usr/local/mysql

Check the permissions in the/usr/local/MySQL directory, as shown in the following figure

I found the problem. It’s really a permission problem. The following troubleshooting is simple. Assign the owner of the data directory to the MySQL user

in RedHat system, : chown mysql.mysql – R/usr/local/MySQL can be used

in CentOS system, : chown can be used mysql:mysql -R /usr/local/mysql

OK, now start MySQL again, as shown in the figure below, there is no error

[ root@SVNServer bin]#/etc/init.d/mysqld start

If the error is still reported, it may be the permission setting problem of/usr/local/MySQL directory. The permission setting is as follows:

chmod 755 /usr/local/mysql

After setting, the permissions are as follows: ll/usr/local/MySQL

Drwxr-xr-x 9 MySQL MySQL 12288 July 26 09:50 MySQL

Try, can connect, as shown in the figure, OK