1. will edbi work with maria db?

I am switching from mysql to maria db and would like to know if edbi will work with maria db.

Thanks!

The quick answer is yes!

new topic     » topic index » view message » categorize

2. Re: will edbi work with maria db?

egis said...

I am switching from mysql to maria db and would like to know if edbi will work with maria db.

Thanks!

That's never been tested AFAIK. It's suppose to be drop-in library binary compatible, so it should just work with the mysql driver of edbi... but we won't know for sure until someone tries it and reports back.

If it turns out to be necessary, I'm sure edbi would be happy to add a MariaDB driver, though.

new topic     » goto parent     » topic index » view message » categorize

3. Re: will edbi work with maria db?

It stops working at:

	edbi:db_handle dbh = edbi:open("mysql://dbusr:dbpwd@localhost/STREETS") 
 

With the error:

Fatal run-time error: 
Could not find a suitable MySQL shared library 
Any gueses as how to point to the suitable MySQL shared library or how do I diagnose?

I know the code works with mysql which was replaced with mariadb.

new topic     » goto parent     » topic index » view message » categorize

4. Re: will edbi work with maria db?

egis said...

It stops working at:

	edbi:db_handle dbh = edbi:open("mysql://dbusr:dbpwd@localhost/STREETS") 
 

With the error:

Fatal run-time error: 
Could not find a suitable MySQL shared library 
Any gueses as how to point to the suitable MySQL shared library or how do I diagnose?

I know the code works with mysql which was replaced with mariadb.

Here is where the edbi mysql driver looks for the mysql client library.

Looking at a libmariaclient package, it seems that it should have created a libmysqlclient.so file in /usr/lib. Is your maria client library in the same location?

new topic     » goto parent     » topic index » view message » categorize

5. Re: will edbi work with maria db?

Using :

locate libmysqlclient.so returns: 
 
/usr/lib64/mysql/libmysqlclient.so.16 
/usr/lib64/mysql/libmysqlclient.so.16.0.0 
 

new topic     » goto parent     » topic index » view message » categorize

6. Re: will edbi work with maria db?

my edbi_mysql.e contains:

constant lib_mysql = open_dll({ 
    "/usr/lib64/mysql/libmysqlclient.so.16", -- stupid hack for openeuphoria.org 
    "libmysqlclient.so", 
    "/usr/lib/libmysqlclient.so", 
    "/usr/local/lib/libmysqlclient.so", 
    "libmysqlclient.dylib", 
        "libmysql.dll" 
}) 

However my /usr/local/lib only contains:

.  ..  edbi_mysql.so  eu.a  eudbg.a  euso.a  eusodbg.a 
 

new topic     » goto parent     » topic index » view message » categorize

7. Re: will edbi work with maria db?

egis said...

Using :

locate libmysqlclient.so returns: 
 
/usr/lib64/mysql/libmysqlclient.so.16 
/usr/lib64/mysql/libmysqlclient.so.16.0.0 
 

That appears to be a x86_64 mysql client library. You'll need to use either the 64bit version of euphoria and edbi (which is in beta for 4.1.0), or install the i386 mysql client library.

new topic     » goto parent     » topic index » view message » categorize

8. Re: will edbi work with maria db?

I am the 64 bit version as beta (euphoria-4.1.0) as it was working with mysql prior to having installed mariadb on my machine.

new topic     » goto parent     » topic index » view message » categorize

9. Re: will edbi work with maria db?

egis said...

I am the 64 bit version as beta (euphoria-4.1.0) as it was working with mysql prior to having installed mariadb on my machine.

Can you confirm that by running eui --version ?

Also, can you confirm that your older mysql client library was in fact 64bit by running the file command on them? (This may not be possible, but I thought it was worth a try. It's possible you had both 32bit and 64bit mysql client libraries installed without realising it.)

Finally, your /usr/local/lib directory has edbi files in it. Those look like 32bit shared objects, which won't work with 64bit eui or with 64bit mariaclient. Can you run file on those to check to see if they are 32bit or 64bit?

new topic     » goto parent     » topic index » view message » categorize

10. Re: will edbi work with maria db?

jimcbrown said...

Can you confirm that by running eui --version ?

egis said...

eui --version 
Euphoria Interpreter v4.1.0 development 
   64-bit Linux, Using System Memory 
   Revision Date: 2012-04-25 09:43:17, Id: 5545:6b3fc2c6be44 

Also, can you confirm that your older mysql client library was in fact 64bit by running the file command on them? (This may not be possible, but I thought it was worth a try. It's possible you had both 32bit and 64bit mysql client libraries installed without realising it.)

egis said...

Not sure how to do this as it is un-installed. But it should have been 64bit.

Finally, your /usr/local/lib directory has edbi files in it. Those look like 32bit shared objects, which won't work with 64bit eui or with 64bit mariaclient. Can you run file on those to check to see if they are 32bit or 64bit?

egis said...

file edbi_mysql.so 
edbi_mysql.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped 

new topic     » goto parent     » topic index » view message » categorize

11. Re: will edbi work with maria db?

All of the files in /usr/local/lib show

file * 
edbi_mysql.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped 
eu.a:          current ar archive 
eudbg.a:       current ar archive 
euso.a:        current ar archive 
eusodbg.a:     current ar archive 

new topic     » goto parent     » topic index » view message » categorize

12. Re: will edbi work with maria db?

jimcbrown said...

Also, can you confirm that your older mysql client library was in fact 64bit by running the file command on them? (This may not be possible, but I thought it was worth a try. It's possible you had both 32bit and 64bit mysql client libraries installed without realising it.)

egis said...

Not sure how to do this as it is un-installed. But it should have been 64bit.

Can you at least confirm the original location of those files? (i.e. where they were located before they wre uninstalled.)

Finally, for one last sanity check, do a file on these to confirm that they really are 64bit.

/usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0

Then edit edbi/drivers/mysql/edbi_mysql.e at line 64 (around here ), so it looks like this:

constant lib_mysql = open_dll({ "/usr/lib64/mysql/libmysqlclient.so.16.0.0", stupid hack "/usr/lib64/mysql/libmysqlclient.so.16", stupid hack "libmysqlclient.so", "/usr/lib/libmysqlclient.so", "/usr/local/lib/libmysqlclient.so", "libmysqlclient.dylib", "libmysql.dll" })

new topic     » goto parent     » topic index » view message » categorize

13. Re: will edbi work with maria db?

jimcbrown said...
jimcbrown said...

Also, can you confirm that your older mysql client library was in fact 64bit by running the file command on them? (This may not be possible, but I thought it was worth a try. It's possible you had both 32bit and 64bit mysql client libraries installed without realising it.)

egis said...

Not sure how to do this as it is un-installed. But it should have been 64bit.

Can you at least confirm the original location of those files? (i.e. where they were located before they wre uninstalled.)

egis said...

My best indicator is that in the working version of mysql/edbi the lib_mysql had the following.

constant lib_mysql = open_dll({ 
    "/usr/lib64/mysql/libmysqlclient.so.16", -- stupid hack for openeuphoria.org 
    "libmysqlclient.so",  
    "/usr/lib/libmysqlclient.so", 
    "/usr/local/lib/libmysqlclient.so", 
    "libmysqlclient.dylib", 
	"libmysql.dll" 
}) 

Finally, for one last sanity check, do a file on these to confirm that they really are 64bit.

/usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0

egis said...

Now this gets confusing. When I use locate libmysqlclient I get

locate libmysqlclient 
/usr/lib64/mysql/libmysqlclient.so.16 
/usr/lib64/mysql/libmysqlclient.so.16.0.0 
/usr/lib64/mysql/libmysqlclient_r.so.16 
/usr/lib64/mysql/libmysqlclient_r.so.16.0.0 

But ls -a shows:

ls -a /usr/lib64/mysql/ 
.  ..  plugin 

When I use

find /usr/lib64/mysql/ -print 
 
/usr/lib64/mysql/ 
/usr/lib64/mysql/plugin 
/usr/lib64/mysql/plugin/query_response_time.so 
/usr/lib64/mysql/plugin/semisync_master.so 
/usr/lib64/mysql/plugin/semisync_slave.so 
/usr/lib64/mysql/plugin/ha_innodb.so 
/usr/lib64/mysql/plugin/metadata_lock_info.so 
/usr/lib64/mysql/plugin/ha_sphinx.so 
/usr/lib64/mysql/plugin/locales.so 
/usr/lib64/mysql/plugin/ha_sequence.so 
/usr/lib64/mysql/plugin/query_cache_info.so 
/usr/lib64/mysql/plugin/sql_errlog.so 
/usr/lib64/mysql/plugin/ha_oqgraph.so 
/usr/lib64/mysql/plugin/server_audit.so 
/usr/lib64/mysql/plugin/handlersocket.so 
/usr/lib64/mysql/plugin/ha_tokudb.so 
/usr/lib64/mysql/plugin/auth_pam.so 
/usr/lib64/mysql/plugin/ha_spider.so 
/usr/lib64/mysql/plugin/auth_socket.so 

ls says there are no files in /usr/lib64/mysql. Locate says the libmysqlclient files are in /usr/lib64/mysql.

I confirmed that mariadb is up and running.

Then edit edbi/drivers/mysql/edbi_mysql.e at line 64 (around here ), so it looks like this:

constant lib_mysql = open_dll({ "/usr/lib64/mysql/libmysqlclient.so.16.0.0", stupid hack "/usr/lib64/mysql/libmysqlclient.so.16", stupid hack "libmysqlclient.so", "/usr/lib/libmysqlclient.so", "/usr/local/lib/libmysqlclient.so", "libmysqlclient.dylib", "libmysql.dll" })

egis said...

Ok it is now set to:

constant lib_mysql = open_dll({ 
    "/usr/lib64/mysql/libmysqlclient.so.16.0.0", -- stupid hack for openeuphoria.org 
    "libmysqlclient.so",  
    "/usr/lib/libmysqlclient.so", 
    "/usr/local/lib/libmysqlclient.so", 
    "libmysqlclient.dylib", 
	"libmysql.dll" 
}) 

I also ran file on the edbi drivers

file /usr/local/share/euphoria/edbi/drivers/mysql/* 
 
edbi_mysql.e:  ASCII English text 
edbi_mysql.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped 
eu.cfg:        ASCII text 
 

new topic     » goto parent     » topic index » view message » categorize

14. Re: will edbi work with maria db?

jimcbrown said...

Can you at least confirm the original location of those files? (i.e. where they were located before they wre uninstalled.)

egis said...

My best indicator is that in the working version of mysql/edbi the lib_mysql had the following.

constant lib_mysql = open_dll({ 
    "/usr/lib64/mysql/libmysqlclient.so.16", -- stupid hack for openeuphoria.org 
    "libmysqlclient.so",  
    "/usr/lib/libmysqlclient.so", 
    "/usr/local/lib/libmysqlclient.so", 
    "libmysqlclient.dylib", 
	"libmysql.dll" 
}) 

I understand. Unfortunately, That's still not enough information to answer the question. But I have a suspicion below.

jimcbrown said...

Finally, for one last sanity check, do a file on these to confirm that they really are 64bit.

/usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0

egis said...

Now this gets confusing. When I use locate libmysqlclient I get

locate libmysqlclient 
/usr/lib64/mysql/libmysqlclient.so.16 
/usr/lib64/mysql/libmysqlclient.so.16.0.0 
/usr/lib64/mysql/libmysqlclient_r.so.16 
/usr/lib64/mysql/libmysqlclient_r.so.16.0.0 

But ls -a shows:

ls -a /usr/lib64/mysql/ 
.  ..  plugin 

When I use

find /usr/lib64/mysql/ -print 
 
/usr/lib64/mysql/ 
/usr/lib64/mysql/plugin 
/usr/lib64/mysql/plugin/query_response_time.so 
/usr/lib64/mysql/plugin/semisync_master.so 
/usr/lib64/mysql/plugin/semisync_slave.so 
/usr/lib64/mysql/plugin/ha_innodb.so 
/usr/lib64/mysql/plugin/metadata_lock_info.so 
/usr/lib64/mysql/plugin/ha_sphinx.so 
/usr/lib64/mysql/plugin/locales.so 
/usr/lib64/mysql/plugin/ha_sequence.so 
/usr/lib64/mysql/plugin/query_cache_info.so 
/usr/lib64/mysql/plugin/sql_errlog.so 
/usr/lib64/mysql/plugin/ha_oqgraph.so 
/usr/lib64/mysql/plugin/server_audit.so 
/usr/lib64/mysql/plugin/handlersocket.so 
/usr/lib64/mysql/plugin/ha_tokudb.so 
/usr/lib64/mysql/plugin/auth_pam.so 
/usr/lib64/mysql/plugin/ha_spider.so 
/usr/lib64/mysql/plugin/auth_socket.so 

ls says there are no files in /usr/lib64/mysql. Locate says the libmysqlclient files are in /usr/lib64/mysql.

I confirmed that mariadb is up and running.

Everything else but this looks good.

locate uses a database to show where files are located, instead of searching out the disk, for performance reasons. I guess when you uninstalled mysql, locatedb didn't get updated, so those files locate returned are the original mysql client library files that were uninstalled, not the mariadb client library.

In other words, this is probably the location of the uninstalled mysql files, not the mariadb files.

From this I conclude one of two things:

Your mariaclient (not mariadb the server, but the client side) is broken, and needs to be fixed. E.g. It's missing client libraries, etc. Once you get this resolved, edbi might just work.

OR

Your mariaclient is installed and set up correctly, but the libraries are in a non-standard location and your system was not set up properly to add this non-standard location to the global system list of library locations to search. In this case, examining a working program that successfully is able to connect to mariadb on your system (even a builtin one like mariadb's version of psql or the commmand line /usr/bin/mysql program) will provide enough information to get edbi working. Something like "ldd /usr/bin/mysql" should give a hint as to where the client library is located.

new topic     » goto parent     » topic index » view message » categorize

15. Re: will edbi work with maria db?

Thanks Jim. I will check out the client libraries. I will let you know if I get it to work. Perhaps the client was not installed at the time when mariadb server was installed. By the way I am using MariaDB version 10.

new topic     » goto parent     » topic index » view message » categorize

16. Re: will edbi work with maria db?

I installed the mariadb client.

This is what I get from running file on /usr/lib64/libmysqlclient*

file /usr/lib64/libmysqlclient* 
/usr/lib64/libmysqlclient.a:           current ar archive 
/usr/lib64/libmysqlclient_r.a:         symbolic link to `libmysqlclient.a' 
/usr/lib64/libmysqlclient_r.so.15:     symbolic link to `libmysqlclient_r.so.15.0.0' 
/usr/lib64/libmysqlclient_r.so.15.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped 
/usr/lib64/libmysqlclient_r.so.16:     symbolic link to `libmysqlclient_r.so.16.0.0' 
/usr/lib64/libmysqlclient_r.so.16.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped 
/usr/lib64/libmysqlclient.so.15:       symbolic link to `libmysqlclient.so.15.0.0' 
/usr/lib64/libmysqlclient.so.15.0.0:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped 
/usr/lib64/libmysqlclient.so.16:       symbolic link to `libmysqlclient.so.16.0.0' 
/usr/lib64/libmysqlclient.so.16.0.0:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped 

I then modified edbi_mysql.e

edbi_mysql.e now has the lib_mysql value set to: 
 
constant lib_mysql = open_dll({ 
    "/usr/lib64/libmysqlclient.so.16.0.0", -- stupid hack for openeuphoria.org 
    "libmysqlclient.so",  
    "/usr/lib/libmysqlclient.so", 
    "/usr/local/lib/libmysqlclient.so", 
    "libmysqlclient.dylib", 
	"libmysql.dll" 
}) 

However when I run a once working edbi app I still get

Fatal run-time error: 
Could not find a suitable MySQL shared library 

Do I need to rebuild the edbi/mysql drivers since edbi_mysql.e was modified?

new topic     » goto parent     » topic index » view message » categorize

17. Re: will edbi work with maria db?

egis said...

Do I need to rebuild the edbi/mysql drivers since edbi_mysql.e was modified?

Yes, you do.

new topic     » goto parent     » topic index » view message » categorize

18. Re: will edbi work with maria db?

The great news is MariaDB 10 does work with edbi on a 64bit centos 6.5 distro!

By the way, if someone needs to know how to install the MariaDB client on centos use:

yum install MariaDB*client 

Then make sure to modify edbi_mysql.e as mentioned above comments as it relates to your machine. Next recompile the edbi driver you are using (euc -so edbi_mysql.e), then chmod 755 edbi_mysql.so and finally cp edbi_mysql.so /usr/local/lib/.

Thanks Jim for all your help and the necessary edbi library!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu