You are not logged in.

#1 2013-12-03 15:39:22

vigon
Member
Registered: 2013-12-03
Posts: 1

Can't start mysqld

Hello world!

I'm a newbie in arch (2 days only...) but not in linux. I'm nearly already sure to love it!

I've already installed successfully LAMP servers under other linux distrubutions. But trying to install a LAMP on my Raspberry Pi  (version 1 maybe it's important for memory...) with archlinux is quite more difficult than I exptected first. Everything works fine (apache, php, ssl...) but not mysql.

I've installed mariadb (pacman -S mariadb) but could not launch it. When I tried a "systemctl start mysql", it failed and I got this :

-------- journal -xn ----------------------------------
-- Logs begin at Thu 1970-01-01 01:00:03 CET, end at Tue 2013-12-03 15:46:42 CET. --
mysqld[3044]: InnoDB: mmap(136183808 bytes) failed; errno 12
mysqld[3044]: 131203 15:46:39 InnoDB: Completed initialization of buffer pool
mysqld[3044]: 131203 15:46:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
mysqld[3044]: 131203 15:46:39 [ERROR] Plugin 'InnoDB' init function returned error.
mysqld[3044]: 131203 15:46:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysqld[3044]: 131203 15:46:39 [Note] Plugin 'FEEDBACK' is disabled.
mysqld[3044]: 131203 15:46:41 [ERROR] Unknown/unsupported storage engine: InnoDB
mysqld[3044]: 131203 15:46:41 [ERROR] Aborting
mysqld[3044]: 131203 15:46:41 [Note] /usr/bin/mysqld: Shutdown complete
systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
-----------------------------------------------------------

Just in case this might help :

free -h
             total       used       free     shared    buffers     cached
Mem:          208M        38M       169M         0B       168K        12M
-/+ buffers/cache:        25M       182M
Swap:           0B         0B         0B

I've thus tried to set innodb pool size manually...

-------my.cnf------
...
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 4M
innodb_log_buffer_size = 8M
...
----------------------

But get this now...

-- Logs begin at Thu 1970-01-01 01:00:03 CET, end at Tue 2013-12-03 16:29:05 CET. --
kernel: [  311]     0   311     1283      162       5        0             0 (sd-pam)
kernel: [  312]     0   312      824      246       5        0             0 bash
kernel: [  313]    33   313     6588      707      14        0             0 httpd
kernel: [  314]    33   314     6588      707      14        0             0 httpd
kernel: [ 1891]    89  1891    84071     9343      53        0             0 mysqld
kernel: [ 1892]    89  1892      793       55       5        0             0 mysqld-post
kernel: [ 1921]    89  1921      793       41       5        0             0 mysqld-post
kernel: [ 1922]    89  1922     4367      273       9        0             0 mysqladmin
kernel: Out of memory: Kill process 1891 (mysqld) score 176 or sacrifice child
kernel: Killed process 1891 (mysqld) total-vm:336284kB, anon-rss:36800kB, file-rss:572kB

that just looks like I've played with razorblades.

Any idea? Do I have to reduce all the other sizes (key_buffer_size, etc etc) so I use much less memory? (known I absolutely don't need a "big" database and/or operations on it)
Thanks in advance for your help!
Please ask if further informations needed to help me wink

Last edited by vigon (2013-12-03 15:40:41)

Offline

#2 2013-12-03 19:18:50

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,596

Re: Can't start mysqld

Hi, welcome to the forum,

mysqld[3044]: 131203 15:46:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool

So, there's no memory left to address to the buffer pool.
You could try and set the 'innodb_buffer_pool_size' as low as 8M.
If you have > 5.5 this is set to default 128M as far as I know.

Offline

Board footer

Powered by FluxBB