Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table is read only?

Status
Not open for further replies.

obz

Programmer
Jan 15, 2003
3
CA
Hello...
I was running MySQL on Windows 2000... and switched to Linux, anyways... I brought over my .frm .myi .myd files and I can read them fine! The problem is I can't seem to write to these databases,... I get a "Table 'shoutbox' is read only" error.

Do I have to set priviledges somewhere? Any direction is appreciated.

~obz
 
On Linux the files are owned by root...

Hmmm... I've switched the linux ownership to mysql... still can't write them..(chown)

How do I determine if the mysql user has permission to write to a particular database?

is this a grant priviledges issue?

thanks!

~obz
 
What are the chmod settings? The MySQL user can own the files, but still not have permission to write.

Assuming the on your server MySQL runs as the user "mysql", what you need to do is give mysql ownership of the files:

chown mysql.mysql <appropriate file wildcard>

Then give MySQL permission to write:

chmod 660 <same appropriate file wildcard>


To check permissions, use &quot;ls -l&quot; to see permissions and ownership. On my machine, the user-table files in the mysql database look something like:

-rw-rw---- 1 mysql mysql 9148 Oct 21 13:51 user.frm
-rw-rw---- 1 mysql mysql 1605 Jan 15 10:08 user.MYD
-rw-rw---- 1 mysql mysql 2048 Jan 15 10:09 user.MYI Want the best answers? Ask the best questions: TANSTAAFL!
 
huh!

...i'm not sure if that was it or not... (i've changed a few things...) but it is working now... :D

I chmod'ed all three sql files read/write and changed them so the owner and group is mysql... and it is ALIVE.. thanks for your help.

~dag
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top