myisam2aria with the /go/myisam2aria Command

/go/myisam2aria changes the storage engine of MariaDB tables from MyISAM to Aria, MariaDB's crash-safe replacement for MyISAM. It works in three modes: It needs MariaDB. Aria does not exist in Oracle MySQL. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Convert all MyISAM tables in one database
/go/myisam2aria shop_db

Arguments

Position Name Required Notes
1 <database> or all Yes A database name, or the word all for every database.
2 <table> No A table in that database. If given, only this table is converted, whatever its engine.

The command has no --option flags.

Examples

# Convert all MyISAM tables in one database
/go/myisam2aria shop_db

# Convert one table
/go/myisam2aria shop_db orders

# Convert every database on the server
/go/myisam2aria all

# Check the engines afterwards
mariadb -e "SELECT table_name, engine FROM information_schema.tables WHERE table_schema='shop_db';"

Output

The command prints progress text. Errors come directly from MariaDB.

Message Meaning
Converting Database <database> to Aria... all mode: the start of one database, between two lines of dashes.
Converting Table '<table>' to Aria... A table is being converted.
(nothing) The database has no MyISAM tables, so there was nothing to do.

There is no summary at the end. Every call is also appended to /var/log/go/myisam2aria.log.

Exit codes

Situation Exit code
No arguments 1, no message
all Always 1, even when every conversion succeeded
One database or one table The status of the last step

Do not rely on the exit code in all mode.

Security

The command reads the MariaDB root password from GoAdmio’s config.php and passes it to mariadb with -p to list the tables, so it is briefly visible in the process list. The password is not written to the log.

See the full reference at /go/myisam2aria and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

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