[GNC] MySQL

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[GNC] MySQL

Keith Bellairs
For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4. Is
my xml file exportable to mysql? If so, is there a writeup? I tried a
couple of obvious things (save as, make myself a dba, create Gnucash schema
in mysql) and made no progress.

Keith
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

David Cousens
Keith,

See the following links for setup on MacOSX with MySQL

https://www.gnucash.org/docs/v3/C/gnucash-guide/basics-files1.html
https://wiki.gnucash.org/wiki/MacOS_Installation
https://lists.gnucash.org/pipermail/gnucash-user/2011-February/038511.html
http://www.matt-thornton.net/tech/databases/gnucash-mysql-os-x-10-10-getting-it-running

I'm not a mySQL or MacOSX user. Someone else may be able to give you more
specific information.

David Cousens



-----
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
David Cousens
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

John Ralls
In reply to this post by Keith Bellairs


> On Mar 5, 2019, at 12:56 PM, Keith Bellairs <[hidden email]> wrote:
>
> For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4. Is
> my xml file exportable to mysql? If so, is there a writeup? I tried a
> couple of obvious things (save as, make myself a dba, create Gnucash schema
> in mysql) and made no progress.

You need to create a user and grant it pretty much everything, then provide that userid and password and let GnuCash create the database.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

GnuCash - User mailing list
John, for MySQL, don't Mac users have to build Gnucash with the appropriate libdbd-mysql dependency added in? ISTR at some point that we needed to build gnucash ourselves to add this functionality.  Or am I misremembering?

David T.
 
 
  On Wed, Mar 6, 2019 at 3:50, John Ralls<[hidden email]> wrote:  

> On Mar 5, 2019, at 12:56 PM, Keith Bellairs <[hidden email]> wrote:
>
> For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4. Is
> my xml file exportable to mysql? If so, is there a writeup? I tried a
> couple of obvious things (save as, make myself a dba, create Gnucash schema
> in mysql) and made no progress.

You need to create a user and grant it pretty much everything, then provide that userid and password and let GnuCash create the database.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
 
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

John Ralls
David,

For 2.6 yes. For 3.x everything is in the bundle for all three database backends just like Windows.

Regards,
John Ralls

> On Mar 5, 2019, at 6:12 PM, David T. <[hidden email]> wrote:
>
> John, for MySQL, don't Mac users have to build Gnucash with the appropriate libdbd-mysql dependency added in? ISTR at some point that we needed to build gnucash ourselves to add this functionality.  Or am I misremembering?
>
>
> David T.
>
>
> On Wed, Mar 6, 2019 at 3:50, John Ralls
> <[hidden email]> wrote:
>
>
> > On Mar 5, 2019, at 12:56 PM, Keith Bellairs <[hidden email]> wrote:
> >
> > For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4. Is
> > my xml file exportable to mysql? If so, is there a writeup? I tried a
> > couple of obvious things (save as, make myself a dba, create Gnucash schema
> > in mysql) and made no progress.
>
> You need to create a user and grant it pretty much everything, then provide that userid and password and let GnuCash create the database.
>
> Regards,
> John Ralls
>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

GnuCash - User mailing list
Thanks for clarifying.

I'm probably also mixing some of this in with the whole Python on Macs issue.


David
 
 
  On Wed, Mar 6, 2019 at 10:11, John Ralls<[hidden email]> wrote:   David,

For 2.6 yes. For 3.x everything is in the bundle for all three database backends just like Windows.

Regards,
John Ralls

> On Mar 5, 2019, at 6:12 PM, David T. <[hidden email]> wrote:
>
> John, for MySQL, don't Mac users have to build Gnucash with the appropriate libdbd-mysql dependency added in? ISTR at some point that we needed to build gnucash ourselves to add this functionality.  Or am I misremembering?
>
>
> David T.
>
>
> On Wed, Mar 6, 2019 at 3:50, John Ralls
> <[hidden email]> wrote:
>
>
> > On Mar 5, 2019, at 12:56 PM, Keith Bellairs <[hidden email]> wrote:
> >
> > For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4. Is
> > my xml file exportable to mysql? If so, is there a writeup? I tried a
> > couple of obvious things (save as, make myself a dba, create Gnucash schema
> > in mysql) and made no progress.
>
> You need to create a user and grant it pretty much everything, then provide that userid and password and let GnuCash create the database.
>
> Regards,
> John Ralls
>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
 
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Keith Bellairs
Yes, the Save As selection is not grayed out. So I assumed the drivers were
in the Mac package.

My MySQL instance is up and running.

But I get a gnc error when I try to do the Save As.

Attaching a screenshot of the error.  (bad or corrupt data)

Any ideas?

Keith



On Wed, Mar 6, 2019 at 1:15 AM David T. <[hidden email]> wrote:

> Thanks for clarifying.
>
>
> I'm probably also mixing some of this in with the whole Python on Macs
> issue.
>
>
> David
>
> On Wed, Mar 6, 2019 at 10:11, John Ralls
> <[hidden email]> wrote:
> David,
>
> For 2.6 yes. For 3.x everything is in the bundle for all three database
> backends just like Windows.
>
> Regards,
> John Ralls
>
> > On Mar 5, 2019, at 6:12 PM, David T. <[hidden email]> wrote:
> >
> > John, for MySQL, don't Mac users have to build Gnucash with the
> appropriate libdbd-mysql dependency added in? ISTR at some point that we
> needed to build gnucash ourselves to add this functionality.  Or am I
> misremembering?
> >
> >
> > David T.
> >
> >
> > On Wed, Mar 6, 2019 at 3:50, John Ralls
> > <[hidden email]> wrote:
> >
> >
> > > On Mar 5, 2019, at 12:56 PM, Keith Bellairs <[hidden email]>
> wrote:
> > >
> > > For other reasons I added MySQL to my Mac OS X and I am using GNC 3.4.
> Is
> > > my xml file exportable to mysql? If so, is there a writeup? I tried a
> > > couple of obvious things (save as, make myself a dba, create Gnucash
> schema
> > > in mysql) and made no progress.
> >
> > You need to create a user and grant it pretty much everything, then
> provide that userid and password and let GnuCash create the database.
> >
> > Regards,
> > John Ralls
> >
> >
> > _______________________________________________
> > gnucash-user mailing list
> > [hidden email]
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists
> for more information.
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
>

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

mysqlerror.png (279K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Colin Law
On Wed, 6 Mar 2019 at 15:36, Keith Bellairs <[hidden email]> wrote:
>
> Yes, the Save As selection is not grayed out. So I assumed the drivers were
> in the Mac package.
>
> My MySQL instance is up and running.
>
> But I get a gnc error when I try to do the Save As.
>

Have a look in the gnucash trace file to see if it says anything more helpful

Colin
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Keith Bellairs
gnucash.trace is empty.

Of some interest, I did a Save As to sqlite and it worked. So the xml data
is acceptable to that DB.

XML -> sqlite  OK
XML -> mysql NG
sqlite -> mysql NG

I tried to do a Save As from the sqlite db to MySQL. That Save As ground
away for a few minutes and then threw the same bad data error. So I am
guessing that I have a problem with my mysql server. But of course the
error log for mysql is clean.

There may be some mysql magic I am missing. Since I don't live there I may
not push on it much longer.

Keith


On Wed, Mar 6, 2019 at 11:44 AM Colin Law <[hidden email]> wrote:

> On Wed, 6 Mar 2019 at 15:36, Keith Bellairs <[hidden email]> wrote:
> >
> > Yes, the Save As selection is not grayed out. So I assumed the drivers
> were
> > in the Mac package.
> >
> > My MySQL instance is up and running.
> >
> > But I get a gnc error when I try to do the Save As.
> >
>
> Have a look in the gnucash trace file to see if it says anything more
> helpful
>
> Colin
>
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Colin Law
On Wed, 6 Mar 2019 at 19:09, Keith Bellairs <[hidden email]> wrote:

>
> gnucash.trace is empty.
>
> Of some interest, I did a Save As to sqlite and it worked. So the xml data is acceptable to that DB.
>
> XML -> sqlite  OK
> XML -> mysql NG
> sqlite -> mysql NG
>
> I tried to do a Save As from the sqlite db to MySQL. That Save As ground away for a few minutes and then threw the same bad data error. So I am guessing that I have a problem with my mysql server. But of course the error log for mysql is clean.
>
> There may be some mysql magic I am missing. Since I don't live there I may not push on it much longer.

Can you connect to the database using the command line utility with
that user/pwd you specified?
Has it created the database when you look from the command line?

Colin
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Keith Bellairs
Yes I can connect using the mysql command line tool. No, the gnucash db has
not been created.

But I cannot use the mysqlworkbench shell. It complains about a missing
connector (python?)

Also, gnc get the "bad data" error even if I try to "save as" with a bad
password, no password, or no user id. So it doesn't look like it is really
hitting the db at all.

Keith





On Wed, Mar 6, 2019 at 3:28 PM Colin Law <[hidden email]> wrote:

> On Wed, 6 Mar 2019 at 19:09, Keith Bellairs <[hidden email]> wrote:
> >
> > gnucash.trace is empty.
> >
> > Of some interest, I did a Save As to sqlite and it worked. So the xml
> data is acceptable to that DB.
> >
> > XML -> sqlite  OK
> > XML -> mysql NG
> > sqlite -> mysql NG
> >
> > I tried to do a Save As from the sqlite db to MySQL. That Save As ground
> away for a few minutes and then threw the same bad data error. So I am
> guessing that I have a problem with my mysql server. But of course the
> error log for mysql is clean.
> >
> > There may be some mysql magic I am missing. Since I don't live there I
> may not push on it much longer.
>
> Can you connect to the database using the command line utility with
> that user/pwd you specified?
> Has it created the database when you look from the command line?
>
> Colin
>
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

Colin Law
On Wed, 6 Mar 2019 at 21:44, Keith Bellairs <[hidden email]> wrote:
>
> Yes I can connect using the mysql command line tool. No, the gnucash db has not been created.
>
> But I cannot use the mysqlworkbench shell. It complains about a missing connector (python?)
>
> Also, gnc get the "bad data" error even if I try to "save as" with a bad password, no password, or no user id. So it doesn't look like it is really hitting the db at all.

The fact that there is nothing in the trace file suggests that too I
think.  I assume you looked at the trace file immediately after the
error, it is cleared each time gnucash is run.
You could try running gnucash itself from the command line and see if
it says anything in the terminal, assuming you can do that on a Mac.
Otherwise I am out of ideas.

Colin
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

David G Hamblen-2
In the past, I've had problems with a mysql file, just getting
seqfaults.  Turned out that I was entering a transaction with a 1962
date.  I forget the details, but mysql stored it as a zero, which I
couldn't reopen.  I changed the date (to post-1970?)  with the mysql
command line tool.  Perhaps more recent versions of GC handle this better.

On 3/6/19 4:49 PM, Colin Law wrote:

> On Wed, 6 Mar 2019 at 21:44, Keith Bellairs <[hidden email]> wrote:
>> Yes I can connect using the mysql command line tool. No, the gnucash db has not been created.
>>
>> But I cannot use the mysqlworkbench shell. It complains about a missing connector (python?)
>>
>> Also, gnc get the "bad data" error even if I try to "save as" with a bad password, no password, or no user id. So it doesn't look like it is really hitting the db at all.
> The fact that there is nothing in the trace file suggests that too I
> think.  I assume you looked at the trace file immediately after the
> error, it is cleared each time gnucash is run.
> You could try running gnucash itself from the command line and see if
> it says anything in the terminal, assuming you can do that on a Mac.
> Otherwise I am out of ideas.
>
> Colin
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
--
[hidden email]
home phone (207) 633-4342
Cell Phone (207) 350-0440

_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

GnuCash - User mailing list
On 3/7/19 7:22 AM, David G Hamblen wrote:
> In the past, I've had problems with a mysql file, just getting
> seqfaults.  Turned out that I was entering a transaction with a 1962
> date.  I forget the details, but mysql stored it as a zero, which I
> couldn't reopen.  I changed the date (to post-1970?)  with the mysql
> command line tool.  Perhaps more recent versions of GC handle this better.
>

In the old days, and perhaps to this day, UNIX and Linux systems had no
dates prior to 1970/01/01. Maybe mysql still has this limitation. In the
early days of UNIX, it ran on 16-bit machines and they kept time to the
second in a double-precision format.

Now, with 64-bit machines being de rigueur, time is kept more
accurately, and will not run out in 2038. ;-)

--
  .~.  Jean-David Beyer
  /V\  PGP-Key:166D840A 0C610C8B
 /( )\ Shrewsbury, New Jersey
 ^^-^^ 10:20:01 up 4 days, 19:23, 2 users, load average: 5.19, 5.19, 4.99
_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] MySQL

John Ralls


> On Mar 7, 2019, at 7:39 AM, Jean-David Beyer via gnucash-user <[hidden email]> wrote:
>
> On 3/7/19 7:22 AM, David G Hamblen wrote:
>> In the past, I've had problems with a mysql file, just getting
>> seqfaults.  Turned out that I was entering a transaction with a 1962
>> date.  I forget the details, but mysql stored it as a zero, which I
>> couldn't reopen.  I changed the date (to post-1970?)  with the mysql
>> command line tool.  Perhaps more recent versions of GC handle this better.
>>
>
> In the old days, and perhaps to this day, UNIX and Linux systems had no
> dates prior to 1970/01/01. Maybe mysql still has this limitation. In the
> early days of UNIX, it ran on 16-bit machines and they kept time to the
> second in a double-precision format.
>
> Now, with 64-bit machines being de rigueur, time is kept more
> accurately, and will not run out in 2038. ;-)
>

MySQL has two date-time field types, TIMESTAMP and DATETIME. TIMESTAMP uses a 32-bit unix time and doesn't like 0, so it works only after 1970-01-01 00:00:01. It's also subject to the 2038 bug. DATETIME is supposed to be good from 1000-01-01 to 9999-12-31 and we changed the MySQL schema in GnuCash to use DATETIME for GnuCash 3.2.

Note that many Linux distros actually install MariaDB for their "MySQL" package and MariaDB's documentation says that it treats TIMESTAMP as DATETIME, but Mechtilde found a problem with that, see https://bugs.gnucash.org/show_bug.cgi?id=797121. There's also at least one case where the conversion either failed or didn't run, https://bugs.gnucash.org/show_bug.cgi?id=797112.

Regards,
John Ralls


_______________________________________________
gnucash-user mailing list
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.