automysqlbackup: line 551: mysqlshow: command not found

I have been receiving the following error messages when backing up my MariaDB database every day: “/usr/local/bin/automysqlbackup: line 551: mysqlshow: command not found.” This probably happened when I switched from MySQL to MariaDB for my database. The automysqlbackup program has been reliable over the years in making nightly backups of my database. This is a popular piece of software used by many, and I highly recommend it. It can be downloaded at https://sourceforge.net/projects/automysqlbackup/. It is no longer actively maintained, yet it still works great. The last update was 2019-0720.

I finally became tired of the daily email warning of the missing “mysqlshow” command and decided to take action. After investigation, I discovered that MariaDB uses the “mariadb-show” command instead of “mysqlshow”. Backups were being made correctly, but I wanted the error message to go away. The fix was simply opening up automysqlbackup from a command line text editor (nano) and searching (Ctrl + f in nano) for “mysqlshow” and replacing it with the “mariadb-show” command. The following lines contained “mysqlshow” to be replaced: 532, 538, 541, 544, 551, 555, 559. Nano also has a find/replace command to make this faster. I saved the file with a new name, “automysqlbackup-mariadb”, and updated the crondaily with the new script name. I am attaching the new script here for inspection and use.

mariadb-show reference: https://mariadb.com/docs/server/clients-and-utilities/administrative-tools/mariadb-show

From the MariaDB website

MariaDB Community Server is one of the most popular database servers in the world. The MariaDB database has been downloaded over 1 billion times and is the default over MySQL in the majority of Linux distributions. Created by MySQL’s original developers, MariaDB is compatible with MySQL and Oracle, and is guaranteed to always be open source.

Thank you MariaDB for making a great opensource product!

Leave a Reply

Your email address will not be published. Required fields are marked *