mysql problem in linux
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
mysql problem in linux
Hi, I have a problem when trying to connect to a mysql database from Linux. The program works fine in windows but not on Linux.
I write the code in the connect button is this:
on mouseUp
answer "calidad esto si funciona"
global gConID
put revOpenDatabase("mysql", "localhost", "test", "root","" )into tConID
if tConID is "" then
answer warning "Problem creating or accessing database!"
else
answer information "AppReg Connected! Your connection ID is: " & tConID
put tConID into gConID
end if
answer information "ni modo no dijo nada"
answer "el valor de la variable es "&tConID
end mouseUp
What am I doing wrong?
I write the code in the connect button is this:
on mouseUp
answer "calidad esto si funciona"
global gConID
put revOpenDatabase("mysql", "localhost", "test", "root","" )into tConID
if tConID is "" then
answer warning "Problem creating or accessing database!"
else
answer information "AppReg Connected! Your connection ID is: " & tConID
put tConID into gConID
end if
answer information "ni modo no dijo nada"
answer "el valor de la variable es "&tConID
end mouseUp
What am I doing wrong?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Can you post what exactly is shown upon as it is a little difficult to know what's wrong when you don't have the error message 
Jan Schenkel.
Code: Select all
answer "el valor de la variable es "&tConID

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
The problem
Hey, thanks for responding.Janschenkel wrote:Can you post what exactly is shown uponas it is a little difficult to know what's wrong when you don't have the error messageCode: Select all
answer "el valor de la variable es "&tConID
Jan Schenkel.
*** I am using a traductor from spanish. ***
The problem is that it does not get any error message, just in linux does not do anything or show any message. All messages (answer) that I place after the command revOpenDatabase are ignored. In Windows runs perfect but not in Linux. any code to show me the error ?
I took the code to connect to the database from dictionary and works properly on Windows. All messages (answer) that I place after the code also are shown. But Linux does nothing, does not show any message after the code to connect to mysql.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Could you wrap it within a 'try-catch' structure and see if it throws an error? Also the correct way to see if a connection was established, is checking if the connecton ID is a number - otherwise it should contain an error string beginning with "revdberr"
HTH,
Jan Schenkel.
Code: Select all
on mouseUp
answer "calidad esto si funciona"
global gConID
try
put revOpenDatabase("mysql", "localhost", "test", "root","" )into tConID
catch tError
answer error "ERROR:" & return & tError
exit mouseUp
end try
if tConID is not an integer then
answer warning "Problem creating or accessing database!" & return & tConID
else
answer information "AppReg Connected! Your connection ID is: " & tConID
put tConID into gConID
end if
answer information "ni modo no dijo nada"
answer "el valor de la variable es "&tConID
end mouseUp
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Janschenkel wrote:Could you wrap it within a 'try-catch' structure and see if it throws an error? Also the correct way to see if a connection was established, is checking if the connecton ID is a number - otherwise it should contain an error string beginning with "revdberr"HTH,Code: Select all
on mouseUp answer "calidad esto si funciona" global gConID try put revOpenDatabase("mysql", "localhost", "test", "root","" )into tConID catch tError answer error "ERROR:" & return & tError exit mouseUp end try if tConID is not an integer then answer warning "Problem creating or accessing database!" & return & tConID else answer information "AppReg Connected! Your connection ID is: " & tConID put tConID into gConID end if answer information "ni modo no dijo nada" answer "el valor de la variable es "&tConID end mouseUp
Jan Schenkel.
Hi Jan, thank you for your interest in helping me. I used the code that you said try-catch, and now I get an error message. Of course it means to know and therefore I do not know what is failing. Important, I get the same error when mysql is running that when is stopped. Here the error code:
ERROR:
219,6,9, revOpenDatabase
465,6,1
Any help would be appreciated.
Sincerely: Pedro Chacin
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
It looks like it can't find/load the revdb external. Is this a compiled standalone application or inside the Revolution IDE?
If it is a standalone, did you include the Database support library in your application settings?
Jan Schenkel.
If it is a standalone, did you include the Database support library in your application settings?
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Janschenkel wrote:It looks like it can't find/load the revdb external. Is this a compiled standalone application or inside the Revolution IDE?
If it is a standalone, did you include the Database support library in your application settings?
Jan Schenkel.
Jan, you're a genius. Thank you very much, the problem is solved. I was putting Database support correctly with the option mysql but I was not putting the option database in Scrip libraries. I am infinitely grateful, and if I can just help you in something, here my email: (pmchacin@yahoo.com).
Note:Additionally, I had to change the socket mysql in my.cnf file because it looks at the socket in / tmp / mysql.socket and was in another location, then it will be able to connect.
Pedro Chacin
Venezuela