Thursday, April 7, 2011

Unable to start MySQl

We are not able to start MySQL because of the error below.

110407 00:32:13 mysqld started
110407 0:32:14 InnoDB: Error: cannot allocate 3221241856 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 37679104 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
110407 0:33:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110407 0:33:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110407 0:33:17 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)


I tried to remove the /etc/my.cnf. Always remember to back up the file first :). When i tried to start again the MySQL service still getting the errors. I tried to find some solutions in the web but i cannot find any related problems. I tried to set again the mysql configuration file. And when i tried to start MySQL and kaboom it started. hehehe.. I don't know why but i am able to start the MySQL :)

When i was starting the server i am seeing some weird logs before the MySQl started.

[root@TESTING01 etc]# service mysql start
/usr/bin/my_print_defaults: unknown option '--use-mysqld_safe'
/usr/bin/my_print_defaults: unknown option '--use-mysqld_safe'
Starting MySQL...... [ OK ]
[root@TESTING01 etc]# tail -f /var/lib/mysql/
The On Demand Global Workforce - oDesk
Google