MySQL Bridge - AppleEvent timed out - no connection
MySQL Bridge - AppleEvent timed out - no connection
- Subject: MySQL Bridge - AppleEvent timed out - no connection
- From: Armin Egginger <email@hidden>
- Date: Tue, 9 Dec 2003 11:17:40 +0100
Hi Scripter, Hi Jean Baptiste Le Stang,
i try to connect my MySQL database per Web by AppleScript. I'm online
with DSL connection and want to connect the MySQL database.
I used the sample script from the application MySQL Bridge. I tried
with the command "with timeout of x seconds" but I got also an error.
I'm new in MySQL and doesn't know, what the "mysql.sock" is. Do I have
to change this? On my Computer is no MySQL Server running, do I have to
install this? I'm able to connect the database by the cocoa application
"CocoaMySQL" without problems. Also SQL statements are possible by
"CocoaMySQL".
I got following error:
tell application "MySQLBridge"
connect current application password "mypassword" user "myusername"
host "60.168.25.200" port 3306 socket "/tmp/mysql.sock" database
"mydatabasename"
current application
"MySQLBridge got an error: AppleEvent timed out."
My script:
property mysql_pw : "mypassword"
property mysql_user : "myusername"
property mysql_host : "60.168.25.200"
property mysql_port : 3306
property mysql_socket : "/tmp/mysql.sock"
property mysql_db : "mydatabasename"
property mysql_table : "tablename"
my make_connection(mysql_pw, mysql_user, mysql_host, mysql_port,
mysql_socket, mysql_db)
--set the_result1 to my sample_query("select ID from transfer where (ID
>
3018700)")
set the_result2 to my sample_query("show databases")
set the_result3 to my sample_query("show fields from transfer")
my close_connection()
return {the_result1, the_result2, the_result3}
on make_connection(mysql_pw, mysql_user, mysql_host, mysql_port,
mysql_socket, mysql_db)
--with timeout of 3600 seconds
tell application "MySQLBridge" to connect password mysql_pw user
mysql_user host mysql_host port mysql_port socket mysql_socket database
mysql_db
--end timeout
end make_connection
on sample_query(thisQuery)
tell application "MySQLBridge" to return runSQL thisQuery
end sample_query
on close_connection()
tell application "MySQLBridge" to close connection
end close_connection
MacOSX.2.8, AppleScript 2.0 (v36) beta
MySQL Bridge is a faceless application and I checked the running in the
apple processapplication. MySQL Bridge is running but never stop! I
quit the AppleScript and MySQL Bridge is running all the time. It takes
20 % of the CPU. Also the AppleScript
tell application "MySQLBridge"
quit
end tell
can't stop the application. I have to quit the process manuall! Why?
What do I'm wrong? Pls help - thx in advance.
Armin
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.