Hi Adam
tc@box:~$ mysql -u root -e 'show databases'
+--------------------+
| Database |
+--------------------+
| db_test |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
tc@box:~$
tc@box:~$
tc@box:~$ mysql -u root -e 'mysqldump db_test > db_test.sql'
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysqldump db_test > db_test.sql' at line 1
tc@box:~$
I think the error is telling you one of two things. Either it doesn't recognize the mysqldump command or it is unhappy with
your choice of file names. I wonder if it's unhappy about you using the same base name in both instances. Maybe try
something like:
mysqldump db_test > db_test2.sql
Also, using code tags is the preferred method of showing commands and screen activity, it preserves spacing and text
alignment.