[redland-dev] Redland and DBMS

Christopher Schmidt crschmidt at crschmidt.net
Wed Aug 17 13:05:54 BST 2005


On Wed, Aug 17, 2005 at 08:57:29AM +0200, Irvine Keans wrote:
> Hi there,
>  
> I've got a problem. I cant connect to a mySQL database with redland.
>  
> I tried it with the following Code:
>  
> storage=librdf_new_storage(world, "mysql", "redland", 
                                    "new='yes',
                                     host='localhost',
                                     database='redland',
                                     user='root','password='test'
                                    "
                                    );

I'm assuming your syntax error here (' before password) is accidental,
and not related to the error.

1. What error are you seeing?

2. What language bindings are you using? (This is mostly just for me so
I can try the same exact code to check it.)

3. Are you sure Redland was compiled with MySQL support?
(`redland-config --libs` may help here: look for libmysqlclient)

4. Try changing localhost to 127.0.0.1: I think MySQL treats "localhost"
differently for permissions and so on, and may actually try to connect
via a socket rather than via TCP. (Does Redland work this way? I don't
know.)

5. Are you seeing any changes in the database when you connect? Are
there any tables in there for Redland, or is nothing happening? Do you
have a MySQL log to check and see if there's any connection?

All of this info is useful to try and help find the problem. 

My guess would be check in order of 4, 3, and if that doesn't work, move
onto providing 1, 2, and 5.

-- 
Christopher Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.gnomehack.com/pipermail/redland-dev/attachments/20050817/53cde1a0/attachment.pgp


More information about the redland-dev mailing list