dbmysql.mod :: test_01.bmx
BlitzMax Forums/BlitzMax Beginners Area/dbmysql.mod :: test_01.bmx
| ||
I strip down test_01.bmx because I could not even Print "Hello"SuperStrict Framework bah.DBMySQL Import brl.System Import brl.filesystem Import brl.StandardIO Import brl.basic Print "Hello"Then I get this Message: The program can't start because LIBMYSQL.dll is missing from your computer. Try reinstalling the program to fix this problem. WAMP Server: C:\www\wamp\bin\mysql\mysql5.6.17\lib\libmysql.dll I copy: C:\BlitzMax\mod\bah.mod\dbmysql.mod\lib\win32\libmysql.a C:\BlitzMax\lib\libmysql.a my.ini #skip-networking GRANT ALL PRIVILEGES ON *.* TO 'dbuser'@'%' IDENTIFIED BY 'password3'; FLUSH PRIVILEGES; Local db:TDBConnection = LoadDatabase( "MYSQL", "webdb", "10.36.136.200", 3306, "dbuser", "password3") What I do wrong? My WAMP Server libmysql.dll is the wrong libmysql.dll or Blitz can't find it? |
| ||
The dll should be "findable" by the program, try to copy it to the program's folder. bye Ron |
| ||
I copy libmysql.dll to: C:\Program Files (x86)\MySQL\libmysql.dll Nothing... Then I copy to the BlitzMAX root: C:\BlitzMax\libmysql.dll Now I get my old message back: The application was unable to start correctly (0x000007b). Click OK to close the application. at least I get my old ERROR message when I copy to the BlitzMAX root is it any wrong with my WAMP libmysql.dll? I need to install an MySQL Client program? |
| ||
Yes. Version 5 if I recall, but it could be mentioned somewhere. Ah yes...Forum post -Henri |
| ||
Thanks again Henri The libmysql.dll from: mysql5.6.17 Don't work! I Download mysql-5.5.20-win32.msi from: http://sourceforge.net/projects/mysql.mirror/files/ That was the oldest mysql releace I could find! Then I took libmysql.dll and copy it to: C:\BlitzMax\mod\bah.mod\dbmysql.mod\tests That was working! I then took my .exe and put it in another Windowsmap and try running it Then I get my old message back: The program can't start because LIBMYSQL.dll is missing from your computer. Try reinstalling the program to fix this problem. So I guess I need to distribute the libmysql.dll in the application root path? I try put the .dll in: .\data\libmysql.dll Then it didn't found it again. Is it possible to put: libmysql.dll in: .\data\libmysql.dll ? |
| ||
When I finally could connect to a MySQL Database from a application, I found out that I can't connect to my web hotel MySQL That was little disappointed So I guess I need HttpGet or try get a MySQL Server somewhere I am sitting here in the middle of nowhere with no real internet, I use DHCP, HSPA+ USB dongle Behind at least 1 firewall Life is not meant to be easy I see Brucey's Modules have BaH.Libcurl maybe that can help me |
| ||
If the database on your remote host is not reachable, then this is not the fault of Bruceys lib ... it is just the configuration of your host: it does not allow remote connection (to avoid security breaches). The only thing to "expose" it - is to have something on the host playing as API ... so you can use REST to add/modify/delete/get ... Of course you would then no longer need MySQL but something to communicate with http. bye Ron |
| ||
FWIW, many/most shared hosting providers that I've seen do not allow direct outside connections into their SQL servers... You can get around that by having some php/asp/whatever webpages that can interface with the DB for you, and communicate through those. entirely different approach, though. |
| ||
I didn't complain on Bruceys lib, I probably never going to do that. Brucey and Daniel Stenberg is people I like go see on talk's I can complain allot on Oracle, and it's Oracle that make the changes to libmysql.dll I don't understand this: to have something on the host playing as API ... so you can use REST to add/modify/delete/get ... Sound to me as serverside scripting? You can get around that by having some php/asp/whatever webpages that can interface with the DB for you, and communicate through those. entirely different approach, though. That is probably something I am going to try do soon |
| ||
Depending on the platform(s) you are intending to target: for windows there already something out there that interfaces between blitz and a web DB: Etna - http://repeatuntil.free.fr/Etna/ |
| ||
@REST / php/asp/whatever Both things mean the same: you need a wrapper translating your requests into direct DB-Statements. This creates a security flaw. Make sure not to store Login credentials as statics in your app. Let the user store them individually/ask for them during runtime. That is why APIs use authentification tokens - or per-app-tokens (user + app specific : so they can revoke tokens on malicious activities). bye Ron |
| ||
I miss that I had to put the libmysql.dll in my Application directory Quite big .dll to include in the final map directory root. But then again it's magical.. Is it possible to hide the .dll in: data/libmysql.dll |