How to use mysql.

Hugo Osvaldo Barrera hugo at osvaldobarrera.com.ar
Mon Jan 30 15:07:47 EST 2012


On 2012-01-30 16:45, Hugo Osvaldo Barrera wrote:
> On 2012-01-30 15:52, David G. Hamblen wrote:
>> On 01/30/2012 12:35 PM, Hugo Osvaldo Barrera wrote:
>>> I've been trying to use gnucash with mysql with no luck, and failed to
>>> find any relevant documentation.
>>>
>>> I'm trying to save by selecting File>Save As... and selecting mysql,
>>> and completing the correct host/user/password/database fields.
>>>
>>> I've pre-created the [blank] database, and granted all privileges to
>>> the user I'm using on that database.
>>>
>>> Error is simply "The server at URL mysql://gnucash@localhost/gnucash
>>> experienced an error or encountered bad data or corrupt data.".
>>>
>>> Does anyone have any idea what else needs to be done to get this working?
>>> _______________________________________________
>> With ubuntu (which automatically creates a root account with a root
>> password) here's what I did:
>> 1 - Install mysql in Ubuntu
>> 2 - Create a new user
>>
>> dave:~$    mysql -u root -ppassword
>> mysql> GRANT ALL PRIVILEGES ON *.* TO 'dave'@'localhost'
>>     ->     IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
>> mysql> bye;
>>
>> 3 - in GC, File, then Save As
>>
>> Data Format: mysql
>> Database Connection
>> Host:    localhost
>> Database: homegnucash
>> Username: dave
>> Password: mypassword
>>
>> will create the mysql database "homegnucash"
>>
>> Dave
>>
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> I tried exactly that and I still get the same error:
> 
> "The server at URL mysql://gnucash@localhost/mignucash experienced an
> error or encountered bad or corrupt data."
> 
> (Be warned that, by your instructions, the account 'dave' has access to
> ALL databases.)
> 
> I also tried using the root account, with no luck.
> 
> 

I read somewhere on the internet that using "127.0.0.1" insted of
"localhost" works.
I tried it, and it did. I have NO IDEA why localhost doesn't work. My
hosts file is as it should be, and usually connecting using "localhost"
instead of "127.0.0.1" works fine for other applications.

In any case, I'm replying with my solution for future reference.
I must admit, it IS taking it's time: "select count(guid) from
transactions;" shows 879 transactions in the DB, after about 20 minutes,
and still counting. But it works. :)

-- 
Hugo Osvaldo Barrera


More information about the gnucash-user mailing list