Question

I've downloaded mysql binaries and I'm trying to follow instructions here for installation. when I try to run bin/mysqld_safe --user=mysql & command I get the following output:

40211 19:04:56 mysqld_safe Logging to '/usr/local/mysql/data/irpowerweb.err'.
140211 19:04:56 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
140211 19:04:57 mysqld_safe mysqld from pid file /usr/local/mysql/data/irpowerweb.pid ended

The content of the error log is:

140211 19:07:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2014-02-11 19:07:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-02-11 19:07:02 19511 [Note] Plugin 'FEDERATED' is disabled.
2014-02-11 19:07:02 19511 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2014-02-11 19:07:02 19511 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-11 19:07:02 19511 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2014-02-11 19:07:02 19511 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-11 19:07:02 19511 [Note] InnoDB: Using Linux native AIO
2014-02-11 19:07:02 19511 [Note] InnoDB: Not using CPU crc32 instructions
2014-02-11 19:07:02 19511 [Note] InnoDB: Initializing buffer pool, size = 64.0M
InnoDB: mmap(68370432 bytes) failed; errno 12
2014-02-11 19:07:02 19511 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2014-02-11 19:07:02 19511 [ERROR] Plugin 'InnoDB' init function returned error.
2014-02-11 19:07:02 19511 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-02-11 19:07:02 19511 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-02-11 19:07:02 19511 [ERROR] Aborting

2014-02-11 19:07:02 19511 [Note] Binlog end

...
Shutting down stuff
...

2014-02-11 19:07:02 19511 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140211 19:07:02 mysqld_safe mysqld from pid file /usr/local/mysql/data/irpowerweb.pid ended

Here's my.cnf:

[mysqld]
innodb_buffer_pool_size = 64M    
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

I just want to get mysql running in w/e way. I tried installing the package using yum install mysql-server, downloading rpm packages and failed to get it started. I settled for simple tar package and started following the link above but then again I failed to get it started.
Since the error states Cannot allocate memory for the buffer pool I tried reducing the memory to 64m (default was 128m) and it didn't work. I'm a newbie in this, I've done a lot of searching around and haven't figured out how to fix this.

P.S. If it help, I'm using ssh to connect to a server with low memory (512MB of memory with no swap), and I think it's a red hat Linux.

Was it helpful?

Solution

I found my answer here. Used the following my.cnf and it worked:

[mysqld] 
innodb=OFF 
ignore-builtin-innodb 
skip-innodb
default-storage-engine=myisam 
default-tmp-storage-engine=myisam

OTHER TIPS

Try adding:

[mysqld]
...
skip-bdb
skip-innodb

This will stop the Berkley DB and InnoDB from being started at all.

Your most significant error is:

Cannot allocate memory for the buffer pool

You'll have to lower it, in my.cnf.

When you run free, mysqld_safe is already done cleaning up, so you'd have to monitor memory via another terminal. But it's quite normal that a default my.cnf will use up your available memory. This is one of the reasons why Debian does not ship with a default my.cnf config.

update: just in case, make sure to:

  • Follow MySQL Tuner's advices for your system.
  • Make sure SELinux is either turned off or set to allow mysql
  • Make sure your stack size is large enough using ulimit -s (you can increase it: ulimit -s <new_size> or even ulimit -s unlimited)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top