Cannot stop MariaDB on Ubuntu Lucid – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ubuntu, mysql, innodb, mariadb.
On starting MariaDB 5.5 I am getting the following error:
InnoDB: Unable to lock /var/lib/mysql/ibdata1
Initially ran into this error after a server reboot was done running MariaDB 5.1. Have carried out a number of troubleshooting steps including:
- Upgrading MariaDB to 5.5
- Moving and copying the ib* files
- Removing Apparmor (which stopped syn overflow errors)
I am also getting other errors like:
InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [Note] Plugin 'FEEDBACK' is disabled. [ERROR] Unknown/unsupported storage engine: InnoDB [ERROR] Aborting
But I am confident these are just a result of the initial error.
When I stop MariaDB (/etc/init.d/mysql stop) it says that MariaDB has stopped successfully. But when doing a ps -ef | grep mysql there is still a PID there.
If I kill the PID it is automatically recreated.
The output for ps for this PID is:
mysql 9173 1 17 09:43 ? 00:00:00 /usr/sbin/mysqld
I can login to MySQL when this PID exists and it shows the normal SHOW PROCESSLIST, but there is also a sleeping query.
Are there any other methods I can take to try and resolve this problem? Help would be greatly appreciated.
To get the server back to a known state I’ve done:
- Restore backup prior to making any configuration changes
- Update MariaDB to version 5.5
- Stop Apache and MySQL
- Note that the rogue MySQL PID still existed
- Moved the my.cnf file to a new name
- Stop MySQL again
- Ran ps -ef | grep mysql to see if the PID was gone, it was
- Moved the my.cnf back
- Started MySQL
- Noted that only valid MySQL PID’s existed
- Started Apache and noted that I couldn’t get my websites to connected
- Made Joels change to the my.cnf file (default_storage_engine = InnoDB TO default-storage-engine = innodb)
- Started MySQL and Apache again
Right now, the websites can’t be accessed. Nothing is being written to the syslog or Apache error logs that are untoward. I just can’t figure out why I can’t reach the websites.
I am getting this error in my syslog though:
[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: UPDATE thread AS thread,taggregate_temp_1371329760 AS aggregate
I am now receiving these errors in my syslog:
Jun 16 11:31:45 kernel: net_ratelimit: 5 callbacks suppressed Jun 16 11:31:45 kernel: TCP: Possible SYN flooding on port 80. Sending cookies.
And now after rebooting my server I am receiving this error and the above…
Unable to lock /var/lib/mysql/ibdata1, error: 11
I’ve had this issue before, it’s related to your MariaDB configuration. You’re probably specifying a line in your my.cnf like this one:
default-storage-engine = InnoDB
Specify the storage engine using all lowercase letters like this:
default-storage-engine = innodb