Re: Read only error
Peter Pentchev <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 28, 2005 at 10:20:13AM -0500, Giff Hammar wrote: > I know this should be easy, but I'm stumped. > > I inherited a system that uses perl and mysql to read in a set of e-mails and > process them. The system is running on Debian and was copied from a different > Debian system. When I try to run the perl script to import an e-mail, I get > > DBD::mysql::db do failed: Table 'table_name' is read only at ./parts.pl line > 435. > DBD::mysql::db do failed: Table 'table_name' is read only at /home/inv/sparts.pm > line 140. > Can't lock tables: Table 'table_name' is read only > > I get the same error when I run the script as root or the user 'inv'. So far, I > have: > > 1. Changed ownership of all of the database files to inv > 2. Opened the database file permissions to 777 > 3. Changed the user table in mysql to allow inv full access to all privs > 4. Changed the host table in mysql to allow the local host full access to the > database > > What did I miss? Is it possible that the table has been compressed using myisampack? You can find out my running 'myisampack -t tablename' in the appropriate database directory; if the table is already compressed, myisampack will tell you so, otherwise it will output some statistics about the keys distribution in the table. If the table is compressed, you can use 'myisamchk --unpack tablename' to unpack it - but make sure you do this while the MySQL server is NOT running! After that, you might need to run myisamchk on the unpacked table again, just in case. G'luck, Peter -- Peter Pentchev [email protected] [email protected] [email protected] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I had to translate this sentence into English because I could not read the original Sanskrit.
signature.asc
(application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCIzkp7Ri2jRYZRVMRAvvSAJwObn3tNrTrNYZ34RXgditSmQQ+lACcCtU5 /c5k+RBMNdGqlvRXrmTqSZA= =aVgG -----END PGP SIGNATURE-----