MySQL error 1036: table is read only

前端 未结 6 2029
醉话见心
醉话见心 2021-01-11 22:53

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 art

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 23:40

    i had a similar problem and the solution for me was to change the owner/group of the table files to mysql. you can do two options

    1

    for first you have to go in your server and get privilegies

    sudo su
    

    and then i went to the hidden folder mysql doing:

    cd /var/lib/mysql/
    

    and then i ran this command:

    chown -R mysql:mysql *
    

    and this will solve your problem

    then to see if it works you have to reboot the mysql

    service mysql restart
    

    2

    or you can simply go to phpmyadmin then to your database select all the tables and then you have to select option repair (sorry i got phpmyadmin in italian) you can do this also in bash,

    and this will work! if no option work try to reinstall mysql

提交回复
热议问题