Web lists-archives.com

Dumping database names from bash with exclusion




Using Mysql 5 on darwin (OS x).
This command
SELECT schema_name FROM information_schema.schemata WHERE
schema_name NOT IN
('mysql','information_schema','performance_schema');
as executed from the mysql prompt gives me a dump of all databases
except those not included in the tuple.

This command
mysql -uroot -p****** -e "SELECT schema_name FROM
information_schema.schemata WHERE schema_name NOT IN
('mysql','information_schema','performance_schema')"

gives me a a dump of the entire mysql help screen, _not_ the
databases I am after.

I could use some help on the correct syntax.

thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql