Last evening, I ran some updates on one of my servers. One of the updates was from MariaDB 10.1 to 10.2 (some minor release as well). After compiling, I went to restart, but it failed with:
# /etc/init.d/mysql start
* Checking mysqld configuration for mysql ...
[ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
[ERROR] Aborting
* mysql config check failed [ !! ]
* ERROR: mysql failed to start
I’m not sure why this just hit me now, but it looks like it is a function within the init script that’s causing it to look for files in the nonexistent directory of /usr/share/mysql/
instead of the appropriate /usr/share/mariadb/
. The fast fix here (so that I could get everything back up and running as quickly as possible) was to simply symlink the directory:
cd /usr/share
ln -s mariadb/ mysql
Thereafter, MariaDB came up without any problem:
# /etc/init.d/mysql start
* Caching service dependencies ... [ ok ]
* Checking mysqld configuration for mysql ... [ ok ]
* Starting mysql ... [ ok ]
# /etc/init.d/mysql status
* status: started
I hope that information helps if you’re in a pinch and run into the same error message.
Cheers,
Zach
UPDATE: It seems as if the default locations for MySQL/MariaDB configurations have changed (in Gentoo). Please see this comment for more information about a supportable fix for this problem moving forward. Thanks to Brian Evans for the information. 🙂
4 comments
Skip to comment form
It appears emerge –config dev-db/mariadb is also broken for the same reason on a fresh install for two reasons:
1) /usr/bin/mysql_install_db is not present, instead it is in /usr/share/mariadb/scripts/
2) mysql_install_db, as invoked by emerge –config is broken until the workaround in this post is applied
Great post – thanks for the info!
Author
You’re welcome, Brad. I’m glad that the information helped you.
Cheers,
Zach
You should accept the new configuration which now has a basic /etc/mysql/my.cnf to include all files in /etc/mysql/mariadb.d and this will work itself out. You do not need the symlink as the updated config files point to the correct location. Any customization you make should be in a new file under the directory.
Not accepting the new my.cnf will result in this error. There is a note in the install about this as well.
Author
Thanks, Brian. I didn’t accept the new
my.cnf
as it wanted to comment out everything and I didn’t have the new configurations in place. I also didn’t see an installation note about this change. I’ll look into modifying accordingly.Cheers,
Zach