MySQL Shell 8.0.24 Dump now supports array arguments in non-interactive mode

Recently I posted an article on how to deal with arrays when trying to use MySQL Shell Dump Utility in command line.

Of course, this proposed solution was a workaround for MySQL Shell <= 8.0.23. The new version of MySQL Shell 8.0.24 supports now arrays \o/ !

So if we take the same example of the previous post, we can now use the following syntax:

$ mysqlsh root@localhost -- util dump-instance /tmp/dump \
    --excludeSchemas=["mysql_innodb_cluster_metadata","fred_test"] \
    --threads=8 --showProgress

Please mind that lack of <space> between the elements of the array. If you use a space, you will get the following error:

$ mysqlsh root@localhost -- util dump-instance /tmp/dump \
    --excludeSchemas=["mysql_innodb_cluster_metadata", "fred_test"] \
    --threads=8 --showProgress
ERROR: The following argument is invalid: fred_test]

Another syntax is also supported to not use arrays. It’s possible to use multiple times the --excludeSchemas parameter like this:

$ mysqlsh root@localhost -- util dump-instance /tmp/dump \
    --excludeSchemas=mysql_innodb_cluster_metadata --excludeSchemas=fred_test \
    --excludeSchemas=dbt3 --threads=8 --showProgress

As you can see, the MySQL Shell is listening to the comments ! Thank you for using MySQL Shell and if you haven’t done it yet, please try MySQL Shell Dump & Load… it’s so fast !

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

As MySQL Community Manager, I am an employee of Oracle and the views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

You can find articles I wrote on Oracle’s blog.