Mysql Workbench Edit Table Data Is Read Only

MySQL Workbench Edit Table Data is read only

I'm assuming the table has a primary key. First try to run a unlock tables command to see if that fixes it.

If all else fails you can alter the table to create a new primary key column with auto-increment and that should hopefully fix it. Once you're done you should be able to remove the column without any issues.

As always you want to make a backup before altering tables around. :)

Note: MySQL workbench cannot work without a primary key if that's your issue. However if you have a many to many table you can set both columns as primary keys which will let you edit the data.

MySQL Workbench joined tables edit - Read Only

No workbench user, but in general in databases there's no "edit" command. It's a term workbench seems to have invented and it can mean two things:

  1. Editing the table/database structure. In SQL this is done via the ALTER TABLE ... command.

  2. Editing the data in one or more tables. In SQL this is done via the three commands UPDATE, DELETE and INSERT.

Editing a table/database structure is done to only one table at a time. There's no joining allowed when doing this. That's why there's the "read only" note, if workbench means this with "editing". I'm assuming you mean to edit the data, especially updating it. An example would be

UPDATE zen_products zp
JOIN zen_products_description pd ON zp.products_id = pd.products_id
SET
zp.products_name = pd.another_column,
zp.products_weight = zp.products_weight + 1;

Note, that there are no restrictions on primary keys or anything, to update a table. You can join on any field and still update it. Given of course, you have the right to do so. Please execute this query:

SHOW GRANTS FOR username@host;

to see if you have the rights to update the table.

Table is 'read only'

who owns /var/db/mysql 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

Make a MySQL Workbench connection read only

This is not possible. It would require to modify quite a part of the UI for a very questionable feature. If have no rights to change data you will get an error anyway when trying to apply changes.

Read only table in mysql

To grant all user select, use public instead of a complete user list

REVOKE ALL ON tbl_user FROM PUBLIC
GRANT SELECT ON tbl_user TO PUBLIC


Related Topics



Leave a reply



Submit