Error sewaktu menjalankan MySQL

$ service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

tidak ada pesan lain selain failed. Untuk melihat log error MySQL di Debian, jalankan perintah

$ sudo -u mysql mysqld

output perintah diatas

140416 16:59:47 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140416 16:59:47 [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.
140416 16:59:47 [Note] Plugin 'FEDERATED' is disabled.
140416 16:59:47 InnoDB: The InnoDB memory heap is disabled
140416 16:59:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140416 16:59:47 InnoDB: Compressed tables use zlib 1.2.7
140416 16:59:47 InnoDB: Using Linux native AIO
140416 16:59:47 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140416 16:59:47 InnoDB: Completed initialization of buffer pool
140416 16:59:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140416 16:59:47 [ERROR] Plugin 'InnoDB' init function returned error.
140416 16:59:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140416 16:59:47 [ERROR] Unknown/unsupported storage engine: InnoDB
140416 16:59:47 [ERROR] Aborting
140416 16:59:47 [Note] mysqld: Shutdown complete

InnoDB, yang mengakibatkan error. Karena saya tidak menggunakan InnoDB, maka di file konfigurasi MySQL (/etc/mysql/my.cnf tambahkan

skip-innodb
default-storage-engine=MyISAM

dibawah [mysqld]. Contoh file my.cnf saya setelah di ubah

[mysqld]
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
lc-messages-dir	= /usr/share/mysql
skip-external-locking
skip-innodb
default-storage-engine=MyISAM

setelah selesai, restart MySQL

$ service mysql restart
[ ok ] Stopping MySQL database server: mysqld.
[ ok ] Starting MySQL database server: mysqld.
[info] Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..

Proses berhasil dijalankan.

Leave a comment

Your email address will not be published. Required fields are marked *