Ok, I just tried it and it seems to be a book with seven seals, or, as someone said:
"The Scientists have taken the keys of knowledge and have hidden them."
Fact is if I try to connect over TCP Port 3306 a Connection is establised, but on my user password etc Request I got some ascii Chars including the words "Bad Handshake". I wasted some hours to find a description of the MySQL Login Handshake Procedure, but I didn't find anything useful, even on mysql.com. So I think maybe we better go an other way that makes it pretty simple:
Use mysql.exe that comes with the Mysql Server Distribution in Batch mode. This is a Database Client that will take Username, Password, Host and Databasename to connect, including a Batchfile-Name to process. The Call in Blitz might look like this:
execfile "command /c mysql --user=NAME --host=URL --password=PASS --database=DATABASENAME <batch.txt"
or, using short commands:
execfile "command /c mysql -uUSER -hHOST -pPASS -dDATABASE <batch.txt"
Where of course USER is you username and so on.
If this is done locally then the password (-pPASS) can be omitted completely and Username would be "root" (-uroot).
To make Blitz able to read the Answers of the Database Server, you can as well define an Output File, so you can read that File after the Process:
a$="answer.txt"
if filetype(a$)=1 then deletefile(a$)
execfile "command /c mysql -uUSER -hHOST -pPASS -dDATABASE <batch.txt >answer.txt"
while filetype(a$)<>1
wend
delay 100
r=readfile(a$)
while eof(r)=0
print readline(r)
wend
closefile r
The Batchfile meanwhile includes all neccessary MySQL Commands, such as SELECT, WHERE,CREATE etc.
Let's say your Database Table named "Userinfo" has some Columns named Username, Picture1, CIndex (where CIndex would be used as Entry Index with autoincrement), then you could receive the Content of the Database with the following Batchfile:
SELECT Username, Picture1, CIndex FROM Userinfo ORDER BY CIndex DESC;
That's about it. To get more information about Mysql Commands read the Manuals, Tuts, use the HELP Command in mysql.exe and so on.
"The Scientists have taken the keys of knowledge and have hidden them."
Fact is if I try to connect over TCP Port 3306 a Connection is establised, but on my user password etc Request I got some ascii Chars including the words "Bad Handshake". I wasted some hours to find a description of the MySQL Login Handshake Procedure, but I didn't find anything useful, even on mysql.com. So I think maybe we better go an other way that makes it pretty simple:
Use mysql.exe that comes with the Mysql Server Distribution in Batch mode. This is a Database Client that will take Username, Password, Host and Databasename to connect, including a Batchfile-Name to process. The Call in Blitz might look like this:
execfile "command /c mysql --user=NAME --host=URL --password=PASS --database=DATABASENAME <batch.txt"
or, using short commands:
execfile "command /c mysql -uUSER -hHOST -pPASS -dDATABASE <batch.txt"
Where of course USER is you username and so on.
If this is done locally then the password (-pPASS) can be omitted completely and Username would be "root" (-uroot).
To make Blitz able to read the Answers of the Database Server, you can as well define an Output File, so you can read that File after the Process:
a$="answer.txt"
if filetype(a$)=1 then deletefile(a$)
execfile "command /c mysql -uUSER -hHOST -pPASS -dDATABASE <batch.txt >answer.txt"
while filetype(a$)<>1
wend
delay 100
r=readfile(a$)
while eof(r)=0
print readline(r)
wend
closefile r
The Batchfile meanwhile includes all neccessary MySQL Commands, such as SELECT, WHERE,CREATE etc.
Let's say your Database Table named "Userinfo" has some Columns named Username, Picture1, CIndex (where CIndex would be used as Entry Index with autoincrement), then you could receive the Content of the Database with the following Batchfile:
SELECT Username, Picture1, CIndex FROM Userinfo ORDER BY CIndex DESC;
That's about it. To get more information about Mysql Commands read the Manuals, Tuts, use the HELP Command in mysql.exe and so on.