mIRC Home    About    Download    Register    News    Help

Print Thread
#38793 29/07/03 12:50 AM
Joined: Jun 2003
Posts: 10
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Jun 2003
Posts: 10
I am trying to connect to a remote mysql server. I have configured the server to accept my connection and such, but I need to know how! I tried using mIRC mySQL (its a dll) but it wouldn't run any queries without errors and was hard to use. My question is can i connect to a mysql server WITHOUT dlls? I thought sockets but i am very bad with them and also i don't know what to send to login and execute queries and such.

If anyone can help i will appriate it a LOT.

#38794 29/07/03 03:31 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
The answer would be, sorta. Yes you can use sockets to connect to a MySQL server, but mIRC sockets don't give you access to the full potential of MySQL. For example, MySQL supports encrypted connections, that feature could not be written in mIRC scripting. To actually write the script to handle MySQL fully, especially since you said you're not good with sockets, is probably going to be a lot more difficult than just debugging your problem. If you can give us the error you are getting and the code that is generating it, maybe someone here can help.

#38795 29/07/03 03:54 AM
Joined: Jun 2003
Posts: 10
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Jun 2003
Posts: 10
I am using mirc mysql dll (I got it at www.mircscripts.org) I type this to connect:

//echo $dll(mysql.dll, connect, mySQL -huwd 64.246.24.34 special_forums <HIDDEN PW> special_forums)

and it returns:

1 010 Connect mySQL
(That means that the connection was successful)

So i try a query:

/set %query select * FROM phpbb_users WHERE userid = '2'
//echo $dll(mysql.dll, query, mySQL %query.1)

it returns:

E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E userid = '2'E us

so i try another:

//set %query SELECT user_id FROM phpbb_users WHERE username = 'Not-Special'

SAME Thing!
One last attempt i tried a third one:

/set %query SELECT * FROM phpbb_users WHERE user_id = 2

SAME THING!
What it is supposed to return:

10 22 Query mySQL 1

#38796 29/07/03 04:12 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well the problem seems to be, you have a column name incorrect.

/set %query select * FROM phpbb_users WHERE userid = '2'
Here you have "userid"

/set %query SELECT * FROM phpbb_users WHERE user_id = 2
Here you have "user_id"

I doubt the same table has both columns like that. I'd suggest you verify the column names then try again.

#38797 29/07/03 01:28 PM
Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
http://infiniti.sourceforge.net -- i think that's the MySQL DLL you refer to, but it works perfectly for me and it saved a lot of time.


- cF
Dedicated helper for rent.
#38798 29/07/03 01:41 PM
Joined: Jun 2003
Posts: 10
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Jun 2003
Posts: 10
it has an underscore. I tried this one:

/set %query SELECT username FROM phpbb_users WHERE user_id = 2

and it returns:

mySQL SELECT username FROM phpbb_users WHERE user_id = 2

#38799 30/07/03 05:28 AM
Joined: Feb 2003
Posts: 309
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
I had trouble with the mysql dll being too fussy (It wanted 4.0.5 beta of a certain DLL and didn't like that I had 4.1.0 alpha).

I switched to a sockets solution (its on mircscripts.org); and I have to say its far less elegant than a DLL.

Is that a typo right near

"//echo $dll(mysql.dll, query, mySQL %query.1)"

and shoudlk that be a comma? Just a thought.

Break time.
Stick out with the DLL. Its far far less messy!

#38800 30/07/03 05:48 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
If you're still having trouble with the DLL you can download the correct version here.

#38801 01/08/03 02:19 AM
Joined: Feb 2003
Posts: 309
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
'fraid thats not a solution that works. Fussy pants DLL it is; I'm waiting till mysql 4.1.0 alpha gets supported by it.


Link Copied to Clipboard