revOpendataBase on Linux
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 13
- Joined: Sat Apr 15, 2006 10:03 am
- Location: Italia
revOpendataBase on Linux
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
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
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Re: revOpenDatabase on Linux
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:
Hope this helped,
Jan Schenkel
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:
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.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: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:Code: Select all
revdb_setdriverpath <path_to_drivers> or revSetDatabaseDriverPath <path_to_drivers>
- if you pass "mysql" the engine will look for dbmysql.so
- if you pass "MySQL" the engine will look for dbMySQL.so
Hope this helped,
Jan Schenkel
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- VIP Livecode Opensource Backer
- Posts: 13
- Joined: Sat Apr 15, 2006 10:03 am
- Location: Italia
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?
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?
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
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"?riccardo wrote:but the revOpenDatabase ("mysql","localhost","test","root",""")
I'm not the database specialist that Jan is but maybe this helps you nonetheless
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Re: revOpenDatabase on Linux
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.
Unfortunately, I don't have a Linux machine atm to verify.
Jan Schenkel.
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
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- VIP Livecode Opensource Backer
- Posts: 13
- Joined: Sat Apr 15, 2006 10:03 am
- Location: Italia
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.
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.
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:
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.
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:
would become this:revSetDatabaseDriverPath "/home/amministratore/Desktop/Revolution-2.6.1/components/global environment/database_drivers/Linux/"
Code: Select all
revSetDatabaseDriverPath "/home/amministratore/Desktop/Revolution-2.6.1/components/global\ environment/database_drivers/Linux/"
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:
Code: Select all
#ldd dbmysql.so
Easier said than done!
Hope this helps.
--
Rishi Viner
Australia
Rishi Viner
Australia
-
- VIP Livecode Opensource Backer
- Posts: 13
- Joined: Sat Apr 15, 2006 10:03 am
- Location: Italia
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.
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.
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,
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,
--
Rishi Viner
Australia
Rishi Viner
Australia
-
- Posts: 1
- Joined: Thu Jan 25, 2007 8:25 am