Linux下MySql 1036 错误码解决(1036: Table 'xxxx' is read only)
2014-07-08 09:12
621 查看
这两天在进行网站搬家,这次网站搬家采用直接打包mysql数据库和网页文件的形式进行迁移,上传好mysql data目录里面的网站数据库至VPS上mysql存放数据库的目录里面,解压就行。我的VPS存放数据库的路径是 /usr/local/mysql/var。
上传好网站数据,解压,配置好数据库链接参数就行,网站就能正常连接上了,我本以为这已 经是顺利迁移完成了,但后来操作的时候,发现只能读取数据库的内容,不能更改写入任何信息,提示#1036 – Table ‘* ‘ is read only (*号为任意表),也就是说表只有只读属性。
通过SSH,给数据库文件777权限,admin是我的数据库文件夹
1、 chmod -R 0777 /usr/local/mysql/var/admin/
给数据库目录的所属用户和组改为MySQL
2、chown -R mysql:mysql admin
但是这样还不能更改数据库,首先,找到mysqladmin所在位置,一般都在mysql/bin下面,我的在/usr/local/mysql/bin 里面,还需要运行以下命令:
3、 ./mysqladmin -u root -p flush-tables
之后输入root账号的密码,马上就好了,没有任何任何提示,然后测试一下,能正常读写,搬家也就顺利完成。
您可能感兴趣的文章:
- Linux下的Grep命令使用方法详细介绍
- linux crontab实例分析
- 如何使用Linux的Crontab定时执行PHP脚本的方法
- 深入Linux grep指令的详解(实用型)
- 让DOS下输入命令时也可以象Linux一样用Tab键进行命令自动填充
- Linux防火墙iptables入门教程
- linux使用crontab实现PHP执行计划定时任务
- DBA 在Linux下安装Oracle Database11g数据库图文教程
- linux服务器下通过iptables+Denyhost抵御暴力破解的配置方法
- linux grep正则表达式与grep用法详解
- Linux下如何使用grep命令查找带有tab(退格)的字符
相关文章推荐
- Linux下MySql 1036 错误码解决(1036: Table 'xxxx' is read only)
- Linux下MySQL出现#1036 – Table ‘ ‘ is read only 等错误解决方法
- Linux下MySql出现#1036 – Table ‘ ‘ is read only 错误解决方法
- MySql出现#1036 – Table ‘ ‘ is read only 错误解决方法
- linux下mysql error #1036 - Table 'xxxx' is read only问题的解决方法
- mysql中Table is read only错误解决方法
- mysql做master/slave时当出现ERROR 1036 (HY000): Table is read only 的解决方法
- mysql中“Table ‘’ is read only”的解决办法
- mysql中Table is read only的解决
- mysql table is read only 解决
- Mysql 报错 1036 Table '表名' is read only
- mysql中Table is read only的解决方法
- mysql中Table is read only的解决方法小结
- mysql的table is read only 解决方法
- MySQL的MyISAM表出现Table XXX is read only问题的解决办法
- mysql中Table is read only的解决
- 解决MySql error #1036 Table is read only 错误方法
- mysql的table is read only 解决方法
- Ubuntu下mysql中Table is read only的解决
- 关于mysql Table * is read only错误