[Cialug] MySQLDump - What DB contains a table?

L. V. Lammert lvl at omnitec.net
Thu Jul 20 16:08:14 UTC 2017


On Thu, 20 Jul 2017 khamil8686 at gmail.com wrote:

> Connect to it with MySQL workbench and you have a gui that’s easier
> to search. Otherwise you can ssh in and do ‘show databases’, ‘use
> <database name>’ and ‘show tables’ commands
>
Command line is not that simple when there are 50 databases on the
machine <g>!!, ... turns out the simplest way is to locate the filename
for that table! (That particular database is ancient.)

Unfortunately, after removing that database directory (which actually
works really well, btw), .. I find another error in a database that is in
use now:

-- Retrieving table structure for table schema_info...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table zip_codes...
-- Sending SELECT query...
-- Retrieving rows...
mysqldump: Got error: 1153: Got a packet bigger than 'max_allowed_packet'
bytes when using LOCK TABLES

Interestingly enough, looking at the table directly shows no errors:

mysql> describe zip_codes;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| id       | int(11)      | NO   | PRI | NULL    | auto_increment |
| zip_code | varchar(255) | YES  |     | NULL    |                |
+----------+--------------+------+-----+---------+----------------+
2 rows in set (0.01 sec)

select * from zip_codes shows 540 zip codes.

Seems like something else is happening, .. ??

	Thanks!

	Lee


More information about the Cialug mailing list