mysql 1036,MySQL错误1036:表是只读的

When im trying to insert a record to the table using phpmyadmin it gives me

#1036 - Table 'sch_portfolio' is read only

I saw in some articles they said that this could happen if the owner of this table is somthing other than mysql. so i set the owner as mysql and restart the server. Still im getting the same error. any help would be really appreciated. Thanks in advance

drwxrwxrwx 2 mysql mysql 4096 Jul 13 15:27 schooltap

解决方案

One needs super user privs to do this, most commonly sudo is used to acheve this.

in order too Change the owner of the files.

sudo chown -R mysql:mysql /var/lib/mysql

Reboot Mysql for the changes

sudo service mysql restart

who owns sch_portfolio and what group are they in, should be mysql:mysql. you'll also need to restart mysql for changes to take affect

also check that the currently logged in user had GRANT access to update

The MySQL server is running as user mysql and not as the user I logged into it with. In order for it to access files that have user only rights they must be owned by user ‘mysql’ since that is what the server is running as. Make sure the folder and files used by mysql belong to the user ‘mysql’. These files are located in the /var/lib/mysql directory. The directory itself should also belong to ‘mysql’.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值