I zipped up a database on one server and copied it to another(both Unix). Then i unzipped the files and placed them in the correct database. Now when I go to the MySQL DB on the second server and write a select statement it works, but I am not able to do an insert/update/delete. I see this error:
ERROR 1036 (HY000): Table is read only-
It didn't solve my problem completely, but thats awesome, i didn't find that tip anywhere. I tried the mysqldump with ./ and it worked. now I am able to take a sqldump of my DB. but when i got to the second server and try to restore it using
./mysql -uroot -p yourDatabase < yourDumpFile.sql
it prints out a lot of data from the tables, but it doesnt actually cipy all the tables from the dump. I can still only see the existing tables and not the new ones. Any ideas?
ERROR 1036 (HY000): Table
| thornton wrote on Wed, 22 April 2009 21:26 |
And yes, I tried mysqldump but I keep getting an error that says mysqldump:command not found. I am running this from the command line and not from inside MySQL and I am running it as a superuser. I also tried running it after navigating to the directory where I have mysql and also from mysql/bin where I can see mysqldump |
If you are in the mysql/bin directory you have to write:
./mysqldump -uroot -p yourDatabase yourTableName > yourDumpFile.sql
The important part is the ./ at the beginning.
Because in contrast to Windows the current directory is not part of the PATH in Unix.
Then on your new server:
./mysql -uroot -p yourDatabase < yourDumpFile.sql
And you should be able to do this without restarting mysql.
Hopefully the DROP TABLE yourTable; command will still work, even though you can't insert/update to the table.
If this doesn't work you will have to restart the server.
The impact will most probably only be that the database is not available during the few moments it takes to restart it.
| Quote: |
So could you tell me what the impact of restarting MySQL would be? And is there any workaround? |
The workarounds are the ones I have mentioned in my posts.
Comment
./mysql -uroot -p yourDatabase < yourDumpFile.sql
it prints out a lot of data from the tables, but it doesnt actually cipy all the tables from the dump. I can still only see the existing tables and not the new ones. Any ideas?
Comment
Working...
Comment