At 05:54 PM 8/16/2003 -0400, Rajesh Kumar wrote:
Bennett Haselton wrote:
I'm trying to port my MySQL tables for a database called "tracerlock" from one server to another. On the old server, in the /var/lib/mysql/tracerlock directory, there was a ".MYD", ".MYI" and ".frm" file for every table in the database. So after creating a database called "tracerlock" on the new server, I copied these files over to the /var/lib/mysql/tracerlock directory on the new server. On both servers, all the table files are owned by user "mysql" in the "mysql" group.
Now, when I connect to MySQL on the new machine and load the tracerlock database, "show tables" shows all the tables as expected, and I can perform SELECT statements on them and get the correct results. But when I try doing INSERT statements on one of the tables that was copied over, I get:

Its probably because you did a hard-copy of your tables. Is it advisable to do such a thing? Does MySql keep track of all the tables and databases in another file?

Since MySQL listed tables for all the files that I copied, and since I was able to do SELECTs on them, I figured that the tables must have been added to the database in some semi-valid state.


If yes, then this additional file was not modified when you copied your tables. So MySql thinks that those tables don't exist..but in reality it does exist physically.

Why the hard-copy? Couldn't you have just done a small dump of the table and "sourced" it back into the other database? Wouldn't have taken much time either.

Unfortunately, due to the size of the tables, the dump wouldn't have been that "small" :) And I'm moving the tables between different machines. At this point, it would be much easier to change the one little thing (it's always one little thing) that's probably making the tables read-only.


Also try logging in as root, and try inserting records, and see if that works.

Thanks; I tried it, but it didn't work.


-Bennett

[EMAIL PROTECTED]     http://www.peacefire.org
(425) 497 9002


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



Reply via email to