MySQL tables are read only

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
nicktoop
Posts: 2
Joined: Mon Jan 05, 2009 5:01 pm

MySQL tables are read only

Post by nicktoop »

Hi,

1)
I am having trouble editing a mySQL table using OpenOffice.org Base (version 2.1). I have no problem with simply viewing it.

2)
I am working on a Windows XP machine.

3)
I had previously created a database "parts" which I can read from and update using Java/JDBC/MySQL i.e.

connection = DriverManager.getConnection("jdbc:mysql://localhost/parts", username, password);

I am using the "com.mysql.jdbc.Driver" class.

4)
Everthing seems fine. Using Java I can select from tables and update them.

5)
I next try connecting to the same database using OpenOffice.org Base. I use the following Datasource URL:

jdbc:mysql://localhost/parts

I use the same username and password.

I use the same driver class as I use for my Java program, namely com.mysql.jdbc.Driver.

I can open the "parts" database, doubleclick a table and can see all the records but it is READ ONLY... I neither edit nor delete records.

6)
I want to edit or delete records. Please can someone tell me what am I doing wrong?

7)
I see that there may be some problems regarding user privileges. One of the FAQs on this site states...

Read/Write access rights can be enabled on a per-data-source basis. For this, the "Info" property of a data source should contain a name-value-pair with
Name: IgnoreDriverPrivileges
Value: TRUE

8)
I have tried installing and running the OpenOffice Basic Macro listed at http://dba.openoffice.org/howto/IgnoreD ... leges.html
but it does not seem to have any effect.

9)
I don't know how to directly set the "Info" property of my data source. For my MySQL administration I use "MySQL Administrator Version 1.2.13" running on a Windows XP machine.

10)
I have tried using MyISAM instead of InnoDB as the Table Editor in "MySQL Administrator" but things remain the same.

11)
I have tried using the following Datasource URL:

jdbc:mysql://localhost/parts?IgnoreDriverPrivileges=true

but...wait for it...that doesn't help either.

12)
I have tried using the following Datasource URL:

jdbc:mysql://localhost/parts?useHostsInPrivileges=false

and that doesn't help either.

Thanks for reading this. Any ideas?
OOo 2.1.X on Ms Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: MySQL tables are read only

Post by r4zoli »

Your OOo version pretty old, install OOo 3.0.0 and try again, lot of bugfixes from that version on Base.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
nicktoop
Posts: 2
Joined: Mon Jan 05, 2009 5:01 pm

Re: MySQL tables are read only

Post by nicktoop »

Hi,

Thanks. I have tried that but it doesn't help.

Regards,
Nick
OOo 2.1.X on Ms Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: MySQL tables are read only

Post by r4zoli »

What JDBC version use?
Try latest version from MySQL site.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
wienerschnitzel
Posts: 25
Joined: Sat Jan 17, 2009 7:48 am

Re: MySQL tables are read only

Post by wienerschnitzel »

make sure that the table has a primary key.
I just went through a migration of MS Access db and everything worked fine after some hickups.
On the subform I was able to edit/delete records but on the mainform I couldn't - turned out that during the migration I had some issue with duplicate names for the primary key and subsequently when I edited the table in design mode in Base, it wouldn't show that particular field as being a primary key. Once I solved that, I was able to edit/delete records without any problems.

This was helpful to me: http://user.services.openoffice.org/en/ ... 40&t=11722
OOo 3.0.X on Ms Windows XP + linux
Post Reply