To verify any queries, as well as any permissions or authentication issues, run the zensql.py command from the command line. Here's an example against the MySQL database on a Zenoss server:
cd $ZENHOME/ZenPacks/*ZenSQLTx*/Z*/z*/Z* ./zensql.py -t mysql -H localhost -u zenoss -p zenoss -d events 'select \* from events.log;' Queries completed successfully. | totalTime=54.5899868011
Single quotes (') are required around the SQL statement. Any wild card characters (such as *)
must be escaped, as shown in the previous example.
For the zensql.py command, the database types understood are shown in the following table.
Table 15.4. zensql.py Database Types
Name | Database Type |
---|---|
| MS SQL Server |
| Sybase |
| MySQL Server |