Really? You sure about that? I'm pretty confident that mysql supports different types of databases (myISAM and InnoDB as two of them) as well as different table types within a database. Your reply did help, though, as when I ran it for the default mysql DB, I was reminded of the phrase "engine" in the output. Thus, now I see:

mysql -u root -p -e "show table status" mysql
Enter password:
+---------------------------+--------+---------+------------+------+----------------+-------------+--------------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------------------------------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+---------------------------+--------+---------+------------+------+----------------+-------------+--------------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------------+----------+----------------+---------------------------------------------------+
| columns_priv | MyISAM | 10 | Fixed | 0 | 0 | 0 | 227994731135631359 | 1024 | 0 | NULL | 2009-02-12 10:21:04 | 2009-02-12 10:21:04 | NULL | utf8_bin | NULL | | Column privileges
mysql> show engines;
+------------+---------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+---------+----------------------------------------------------------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | | InnoDB | YES | Supports transactions, row-level locking, and foreign keys | | BerkeleyDB | YES | Supports transactions and page-level locking | | BLACKHOLE | NO | /dev/null storage engine (anything you write to it disappears) | | EXAMPLE | NO | Example storage engine | | ARCHIVE | NO | Archive storage engine | | CSV | NO | CSV storage engine | | ndbcluster | NO | Clustered, fault-tolerant, memory-based tables | | FEDERATED | NO | Federated MySQL storage engine | | MRG_MYISAM | YES | Collection of identical MyISAM tables | | ISAM | NO | Obsolete storage engine |
+------------+---------+----------------------------------------------------------------+
12 rows in set (0.00 sec)

An "engine" is another way of saying "database type". This is distinct from a table type. Of course, the above only shows me the engines that are already compiled in and available for use, but hopefully I can go forward from here... I'm thinking I can do a "show databases;", then pump that into a "for x in ..." to show the engine type for each DB.

Thanks for the assist...

 A. Davis
 Email:     ncc...@gmail.com

 "There is no limit to what a man can accomplish
  if he doesn't care who gets the credit." - Ronald Reagan



Marc Powell wrote:
On Aug 7, 2009, at 2:03 PM, Andrew Davis wrote:

Our Nagios server also has Cacti on it. I'm pretty sure that Cacti uses an InnoDB database, while NDOUtils uses myISAM. The two are backed up differently (example: mysqlhotcopy doesn't working on InnoDB databases). Does anyone know what mysql command you run to determine which type of DB is used for various databases, especially considering you can run multiple types at once? I know I can use "mysqlshow" or the "show databases;" options to show the databases themselves, but it doesn't list the DB type.

It's not a database level option. It's table level.

Using mysqlshow with a -t and a DB name shows the table types, but again, not the database types. I'm sort of stuck on this. I want to make sure I know what DB types I'm dealing with so I can ensure I'm backing them up properly. Google searches aren't helping... the results all go back to the "mysql versus innodb" debate...

My Google-fu seems to be more powerful.

mysql -u Username -p -h database.hostname.com -e "show table status" databasename.

--
Marc


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to