On Wed, Dec 12, 2001 at 06:13:03PM -0500, Tim Payne wrote:
> I've been doing some simple database work in some of my webkit sites.
> Generally I've been using the MySQLdb python plugin which has worked out
> well for me. However, I restarted today to find that all the tables in
> my database were gone. Have any of you used MySQLdb and encountered
> problems like this? Or could it be a problem with my copy of MySQL.
I've never seen MySQL lose tables without a specific DROP command.
Are you sure you're looking in the correct database?
1) Look in the MySQL data directory (maybe /var/lib/mysql). There
should be one subdirectory for each database, containing three files
for each table (tablename.MYD, tablename.MYI, tablename.frm).
Do the file sizes look plausable or are they "really small"?
2) Check file ownership/permissions. The user the MySQL server is
running under must have read/write access to all data files, and
read/write/execute access for directories.
cd /var/lib/mysql
chown -R mysql.mysql /var/lib/mysql
# Or 'nobody' or whoever the MySQL server runs as.
chmod -R u+rwX /var/lib/mysql
# Or 'ug+rwX' or 'ugo+rwX' for less security.
mysqladmin -u root -pPASSWORD flush-tables
Something on your system may have reset the ownership to root.root. If
MySQL doesn't have read access, I think it *will* say the table doesn't
exist.
3) Do a MySQLdb query of "SELECT DATABASE();". Does it return the
correct name?
4) Use the 'mysql' interactive utility. Do "USE mydatabase",
"SHOW DATABASES;", "SHOW TABLES;", etc. If it can't find the tables, none
of MySQL can.
5) Do you have two copies of MySQL installed and two data directories?
Maybe it's looking in the wrong directory. Run "mysqld --help" and it
will tell you where it thinks the data directory is.
--
-Mike (Iron) Orr, [EMAIL PROTECTED] (if mail problems: [EMAIL PROTECTED])
http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss