Page 1 of 1
revOpendataBase on Linux
Posted: Sat Apr 15, 2006 10:26 am
by riccardo
When I try to connect to MySQL on a Linux machine, I have this result:
revdberr.invalid database type.
Where can be the problem?
MySQL runs correctly and I can connect it with 'mysql query browser' application.
WIth rev I can't.
Is a drive problem?If yes, where have I get and install the MySQL driver?
Thanks in advance
Re: revOpenDatabase on Linux
Posted: Sat Apr 15, 2006 3:19 pm
by Janschenkel
Hi Riccardo,
The good news is that it does work on Linux - though setting things up can be tricky, especially to make the engine find the database drivers.
While this should work fine within the Rev IDE, it is still a good thing to check.
From an
old post by Mark Waddingham on the use-rev list:
Mark Waddingham wrote:The Revolution 2.5 (and up) Linux engine has both revXML and revDB embedded within it, so the externals are not necessary. However, the database drivers themselves are not embedded and you need to tell the engine where to find them by doing:
Code: Select all
revdb_setdriverpath <path_to_drivers>
or
revSetDatabaseDriverPath <path_to_drivers>
Where <path_to_drivers> is the directory containing the drivers. Also, Linux paths are case-sensitive so make sure that the value you pass for the database type looks the same as the driver file:
- if you pass "mysql" the engine will look for dbmysql.so
- if you pass "MySQL" the engine will look for dbMySQL.so
Also, when you're using MySQL, the next problem youy encounter may be 'old-style' passwords. Until the Revolution database driver is updated to accomodate the new style passwords, you will have to change the settings in MySQL Administrator.
Hope this helped,
Jan Schenkel
Posted: Sat Apr 15, 2006 3:59 pm
by riccardo
Hi Jan
Thanks for your reply.
I had tried this command:
revSetDatabaseDriverPath "/home/amministratore/Desktop/Revolution-2.6.1/components/global environment/database_drivers/Linux/"
but the revOpenDatabase ("mysql","localhost","test","root",""") returns always the same result: revdberr, invalid database type.
Have you any other suggestions?
Posted: Sat Apr 15, 2006 5:41 pm
by BvG
riccardo wrote:but the revOpenDatabase ("mysql","localhost","test","root",""")
Is that the exact string? If root has no password then i'm pretty sure the last parameter should be "" not """. I am also unsure whether the database identifier is case sensitive, did you try "MySQL"?
I'm not the database specialist that Jan is but maybe this helps you nonetheless

Re: revOpenDatabase on Linux
Posted: Sat Apr 15, 2006 7:27 pm
by Janschenkel
Hi Riccardo,
If you keep getting this error inside the IDE, I'm not sure what is causing it - you shouldn't have to change the database driver path in the IDE.
That being said, it looks like you have the correct (lowercase) name, so that should work. The only other thing I can think of right now, is that you're missing the fifth parameter - the useSSL flag.
Code: Select all
put revdb_connect("mysql";"localhost","test","root","",false) into tConnectionID
Unfortunately, I don't have a Linux machine atm to verify.
Jan Schenkel.
Posted: Sat Apr 15, 2006 7:48 pm
by riccardo
BvG, you are right, I have made a mistake in copy and past the command string.
I beleave that the exact string for an user with no password is "", but I have made a lot of attempts and I have noted that the error depends only by the first parameter of the command. (it doesn'nt change if I use different user, password or db )
I have tried with "mysql", "MySQL", "MYSQL" and the results is always the same.
I have tried the following steps too:
-to make a copy of dbmysql.so in revolution directory;
-to set the permissions of revolution files and directories to rwxrwxrwx
-to install MySQL Server 5.0 and 4.1
but the error result is always the same.
Posted: Thu Apr 20, 2006 3:03 pm
by riccardo
Hi Jan,
As you suggest I have tried too:
put revdb_connect("mysql","localhost","test","root","",false) into tConnectionID
but the result is always:
revdberr,invalid database type
Can I try anything else?
Thanks
Posted: Thu May 04, 2006 1:41 am
by rishi
riccardo,
I can vouch for MySQL + Rev working!

But, it was a
big headache getting the driver to work.
On the pedantic syntax side, don't forget that in Linux you need to escape your spaces when you give a path on the command line. So this:
revSetDatabaseDriverPath "/home/amministratore/Desktop/Revolution-2.6.1/components/global environment/database_drivers/Linux/"
would become this:
Code: Select all
revSetDatabaseDriverPath "/home/amministratore/Desktop/Revolution-2.6.1/components/global\ environment/database_drivers/Linux/"
note the small difference of the added "\" backslash. This may not be your problem, but I thought it was worth noting.
You also need to make sure the driver version works with your MySQL version. To check if the database drivers work on the machine you are using, run the comand line tool "ldd". At the command line, change directory to the database driver file (like dbmysql.so) and then run:
This will list all of the dependencies of the driver file and indicate if the dependencies are not met by stating that the item is "not found". Solve the dependencies to get the database driver working.
Easier said than done!
Hope this helps.
Posted: Fri May 05, 2006 8:32 am
by riccardo
Hi Rishi,
Thanks to you for your contribute too.
Finally I solved my connection problem to MySQL DBNS with the help of Runtime Support.
As Rishi suggested it was due to the dipendencies of dbmysql.so library used by revolution.
Using ldd command you can discover what modules are not present in the system.
The major problem has been about libmysqlclient.so.12 required by dbmysql.so.
It is an old library for Mysql version 4.0.x while in my system I had libmysqlclient.so.14 and there was a conflict between libmysqlclient.so.12 and libmysqlclient.so.14.
I have tried the installation on different systems: Mandriva, Suse, Debian (all in current release) with MySQL 4.1 and Mysql 5.0 and I had the same problem on all configurations.
It could be a good idea to upgrade the dbmysql.so library in the next version of revolution for linux.
At the moment I hope that this can help everyone use mysql and revolution.
Posted: Sat May 06, 2006 10:31 am
by rishi
Hi Riccardo,
Glad to hear you got it working!
This problem comes up with many software packages, not just Rev. You should be able to get Rev working with newer versions of MySQL by installing compatibility libraries, called "compat" by MySQL.
Have a look at this page on the MySQL web site.
I am running Rev with a 4.1.x version of MySQL even though its driver only supports 4.0.x versions. The compat package takes care of the differences and provides the "libmysqlclient.so.12" that is required.
Hope this helps. Cheers,
Posted: Wed Feb 07, 2007 8:58 pm
by gragon
How does this affect those who receive our applications? Will my users be required to take the same steps before run-time, or is this just a compile-time problem?
Is there a way we can build a the rev dbmysql.so ourselves so we can create a version that supports our user's configuration?
Posted: Tue Feb 13, 2007 2:39 pm
by siphosethun
hi
can you help me out, i have built my application on runrev studio 2.6 and would like to deploy a standalone in linux , the application was built on win 32 , i am using mysql database, and have downloaded the xampp to run on linux , how do i deploy my application to run on linux?
sipho