3 messages in com.mysql.lists.perlRE: Read only error| From | Sent On | Attachments |
|---|---|---|
| Giff Hammar | 28 Feb 2005 07:19 | |
| Peter Pentchev | 28 Feb 2005 07:30 | |
| Giff Hammar | 28 Feb 2005 09:03 |
| Subject: | RE: Read only error![]() |
|---|---|
| From: | Giff Hammar (gham...@certifiedparts.com) |
| Date: | 02/28/2005 09:03:42 AM |
| List: | com.mysql.lists.perl |
Peter,
The table was not compressed to begin with, but after I uncompressed it again, it worked. Thanks for the pointer!
Giff
-----Original Message----- From: Peter Pentchev [mailto:ro...@ringlet.net] Sent: Monday, 28 February, 2005 10:31 To: Giff Hammar Cc: pe...@lists.mysql.com Subject: Re: Read only error
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 ro...@ringlet.net ro...@cnsys.bg ro...@FreeBSD.org 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.




