$> ssh root@ip "gunzip < [backupfile.sql.gz] | \ mysql -u [uname] -p[pass] [dbname]"`
but get the error:
ERROR 1044 (42000) at line 42: Access denied for user '[uname]'@'%' to database '[dbname]'
I could do
$> ssh root@ip "mysql -u [uname] -p[pass] [dbname] -e 'drop table [table]'"
So I guess it can't be a remote permission problem.
What is the correct command to do a remote restore of gz file to mysql via ssh then?