Starting MySQL.The server quit without updating PID file

When configuring wordpress, it suddenly prompts me that I can't connect to mysql.

First, I used the following command to check and found that there is no mysql in the process. Confirm that the problem is closed.

ps -ef | grep mysqld

 

Try to start mysql using below command. Prompt error: Starting MySQL.The server quit without updating PID file (/[FAILED]server/mysql/data/^).

service mysqld start

 

I wipe, what's the situation? Check Baidu according to the error message. Basically, there are all kinds of problems, but the biggest hint to me is that you need to look at the mysql error log file.

 

Open the error log file (using Alibaba Cloud's one-click installation package, I searched for the location of this log for a long time, basically it is under /alidata/server/log/mysql), and found a very key point (the bold red text):

2016-06-07 22:11:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp ser
ver option (see documentation for more details).
2016-06-07 22:11:09 3563 [Note] Plugin 'FEDERATED' is disabled.
2016-06-07 22:11:09 3563 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-06-07 22:11:09 3563 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-07 22:11:09 3563 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-06-07 22:11:09 3563 [Note] InnoDB: Memory barrier is not used
2016-06-07 22:11:09 3563 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-07 22:11:09 3563 [Note] InnoDB: Using Linux native AIO
2016-06-07 22:11:09 3563 [Note] InnoDB: Using CPU crc32 instructions
2016-06-07 22:11:09 3563 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2016-06-07 22:11:09 3563 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2016-06-07 22:11:09 3563 [ERROR] Plugin 'InnoDB' init function returned error.
2016-06-07 22:11:09 3563 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-06-07 22:11:09 3563 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-06-07 22:11:09 3563 [ERROR] Aborting

 

This is so special, give the dog a big cake, and the dog knows that the memory is not enough.

Search with this keyword, and you will be prompted to change the my.cnf file, which is in the mysql installation directory.

 

The configuration file has not been changed after installation before, basically just change it to the following

 

--------------------------Original is like this ----------- -------------------------

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
------------------------------------原始是这样------------------------------------

 

------------------------------------ After the change is like this ---------- --------------------------

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

innodb_buffer_pool_size = 16M
------------------------------------ This is the case after the change ------- -----------------------------

 

In a word, brother is poor, 128M really does not have so much memory, which makes mysql unable to start. Change it to this point and then start it.

service mysqld start

 

Normal startup, as follows:

Starting MySQL..                                           [  OK  ]

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326834728&siteId=291194637