any help is welcome
mysql error 1036 - table "xxx" is read only...
Moderator: General Moderators
mysql error 1036 - table "xxx" is read only...
i backuped my files from windows xp to a cd. went on unix and mounted the cd and copied the database including my whole site files to there corresponding directories. after this i kept getting "error 1036: table "user" is read only". i tried everything to fix this....i still cant fix it...
any help is welcome
any help is welcome
Check the user and group settings for that db. That error normally means that mysql can't access the db directory becuase it belongs to a different users. Here is what you do.
From a terminal like xterm, aterm, or wterm.
1) Change to the mysql/data directory. I don't know for sure where that is on your system, but on most, it's in /usr/local/mysql/data.
2) type in ls -l -h. All of the database directories should be owned by mysql and the group should say mysql. Look at the lines below.
drwx------ 2 mysql mysql 4.0k Nov 8 14:57 mysql
drwx------ 2 mysql mysql 4.0k Dec 11 12:34 Racing
The third and fourth columns from the left are the user and group. If in your system it says soemthing else, mysql won't have access to those directories.
3) If you need to change the owner and group info, make sure you're root, then type in...
chown -R mysql.mysql myFooQL (myFooQL being the name of your database)
The "-R" switch tells it to change all the files in the directory. Not just the directory itself. You can get more info concerning chown by typing...
man chown
You've got to realize also that you're coming from Windows where things like file and directory ownership are alien concepts. It takes a while to get your head wrapped around things in the *nix world, but it's worth it.
Cheers,
BDKR
From a terminal like xterm, aterm, or wterm.
1) Change to the mysql/data directory. I don't know for sure where that is on your system, but on most, it's in /usr/local/mysql/data.
2) type in ls -l -h. All of the database directories should be owned by mysql and the group should say mysql. Look at the lines below.
drwx------ 2 mysql mysql 4.0k Nov 8 14:57 mysql
drwx------ 2 mysql mysql 4.0k Dec 11 12:34 Racing
The third and fourth columns from the left are the user and group. If in your system it says soemthing else, mysql won't have access to those directories.
3) If you need to change the owner and group info, make sure you're root, then type in...
chown -R mysql.mysql myFooQL (myFooQL being the name of your database)
The "-R" switch tells it to change all the files in the directory. Not just the directory itself. You can get more info concerning chown by typing...
man chown
You've got to realize also that you're coming from Windows where things like file and directory ownership are alien concepts. It takes a while to get your head wrapped around things in the *nix world, but it's worth it.
Cheers,
BDKR
Hmmmmm.....???? Did you check that all the MYI, MYD, and frm files within those directories are mysql mysql?
Try skipping the grant tables on start up. Go to the mysql directory and try typing in
Another option is to take a completely different tack on this. Do the databases still exist on the XP box? If that's the case, you can use mysqldump to populate a backup database. Just use mysqladmin to create the databases on the Unix box. There will be no tables of course. After that's done, and if you can access the XP box across the network, type in a command like this one...
Cheers,
BDKR
Try skipping the grant tables on start up. Go to the mysql directory and try typing in
Let's see if that works.bin/safe_mysqld --skip-grant-tables &
Another option is to take a completely different tack on this. Do the databases still exist on the XP box? If that's the case, you can use mysqldump to populate a backup database. Just use mysqladmin to create the databases on the Unix box. There will be no tables of course. After that's done, and if you can access the XP box across the network, type in a command like this one...
another exmple may bemysqldump -h 'the ip of the xp box' -P 'if you are not using the standard port' -u 'the user name' -p 'the password. It will prompt you' dbname | mysql dbname
I do stuff like this all the time. It may be the trick. Of course, you could also just dump the db out to a text file then read back in on the Unix box.mysqldump -h 192.168.15.16 -u bushmaster -p dbname | mysql dbname
Let me know....mysql dbname < dumpfile.txt
Cheers,
BDKR