1

My MySQL keep shutdown automatically with this error report:

200405 23:31:39 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
200405 23:31:39 [Note] Plugin 'FEDERATED' is disabled.
200405 23:31:39 InnoDB: The InnoDB memory heap is disabled
200405 23:31:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200405 23:31:39 InnoDB: Compressed tables use zlib 1.2.8
200405 23:31:39 InnoDB: Using Linux native AIO
200405 23:31:39 InnoDB: Initializing buffer pool, size = 128.0M
200405 23:31:39 InnoDB: Completed initialization of buffer pool
200405 23:31:39 InnoDB: highest supported file format is Barracuda.
200405 23:31:39 InnoDB: Waiting for the background threads to start
200405 23:31:40 InnoDB: 5.5.62 started; log sequence number 14465811850
200405 23:31:40 [ERROR] /usr/sbin/mysqld: unknown variable 'set-variable=key_buffer_size=32M'
200405 23:31:40 [ERROR] Aborting
200405 23:31:40 InnoDB: Starting shutdown...
200405 23:31:41 InnoDB: Shutdown completed; log sequence number 14465811850
200405 23:31:41 [Note] /usr/sbin/mysqld: Shutdown complete

When I try to log into MySQL it says:

DBI connect failed : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I try to open /var/run/mysqld/mysqld.sock and can not found mysqld.sock

This happened after I tried to set key_buffer_size=32M by using webmin.

How to make it stop trying to set the key_buffer_size?

Glorfindel
2,2095 gold badges19 silver badges26 bronze badges
asked Apr 5, 2020 at 16:55
2
  • What version of MySQL? Of the configuration package? Commented Apr 14, 2020 at 3:23
  • It seems that MySQL config in webmin has not been upgraded in at least a decade. Don't depend on it. Commented Apr 14, 2020 at 3:39

2 Answers 2

1

in the Module Configuration for mysql you find the path to my.cnf

enter image description here

Edit this file and remove the line with key_buffer_size=32M and save it.

And then start the server.

Webmin information on mysql

answered Apr 5, 2020 at 17:48
5
  • I've remove key_buffer_size from my.cnf but it still wont start, and the error message is still the same Commented Apr 5, 2020 at 18:04
  • is it because the "set-variable=" before key_buffer_size=32M? how to stop mysql from sending this command? Commented Apr 5, 2020 at 18:07
  • mysql start twith the my.cnf file specified.. If you remived the line and save d the file it should noz give the error. How do you put it there in the first place? Commented Apr 5, 2020 at 18:13
  • I finally found the problem in my.cnf there's a line like this set-variable=before key_buffer_size=32M I remove all of it, including set-variable. and my database work find Thank you very much for your help Commented Apr 5, 2020 at 18:16
  • good please accept the answer Commented Apr 5, 2020 at 18:19
0

I had the same problem. After I # the variable I got another error of a non existing variable. So I deleted the my.cnf in etc/. I guess this means use default variables. After that all works in good order.

tinlyx
3,83014 gold badges50 silver badges79 bronze badges
answered Jun 17, 2022 at 14:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.