Jump to content


Photo

Gmsql 1.0


  • This topic is locked This topic is locked
547 replies to this topic

#1 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 22 March 2004 - 11:11 PM

** DISCONTINUED **


Hello all,

GMSQL is a project that allows you to connect to an online MySQL database server using DLLs. You can log on to the server through TCP/IP or an URL, perform any kind of MySQL query and retrieve ALL supported field types as a two-dimensional array. You can even retrieve binary files and save them locally with the game!

WARNING: For advanced GML scripters with MySQL database experience only.

What can you do with these DLLs?

With enough experience, you can...
  • Create simple game play counters or record other game statistics
  • Create online highscore lists: insert new scores and highscores and get the top rankings directly in your game without the need to call PHP pages
  • Store player statistics and characteristics such as names, logon credentials and stats
  • Create MMORPGs... If you're up to it. The tools are here. :D
The package includes:
  • Two DLLs that enable the MySQL database server connection
  • Easy access through a GML library file
  • GMSQL Console, a console tool in editable GMD format
  • A manual with examples in RTF format
Don't forget to read the manual!

** Download link removed **

The DLLs seem pretty stable and you should not encounter the dreaded "unexpected error" during execution. But if you do, please show me the script.

Any questions - only about using the DLL extensions, no generic questions about MySQL please - in this topic. I appreciate any bug reports and errors or omissions in the manual.

Thanks to Nelsobra for the idea and Alasdair Forsythe for providing the online test database. :D

Merry scripting,

Smarty

<EDIT>
SECURITY ALERT:


Communication between client and MySQL server databases is susceptible to hacks on Internet connections because package sniffers can intercept username and password logon information. Therefore, GMSQL is only relatively safe on LAN connections and when Game Maker is used as a server-side application only.

Use Internet client / server connections at your own risk. This security risk is related to the MySQL client library, not to GMSQL. Therefore there is nothing I can do to fix this.

Client / server connections on the Internet may only be safe if clients have registered IP addresses at the server. Refer to the MySQL manual for more information on how to set this up.

Edit: A translation from GMD to GM6 of the console example, done by homebrewpc, can be downloaded from here. Special present for anyone unable to do a conversion themselves.

Edited by Smarty, 20 August 2008 - 01:01 PM.

  • 0

#2 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 22 March 2004 - 11:32 PM

OMGS AMAZING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I LOVE YOU! :D :D

#3 gamefreak1450

gamefreak1450

    Ultimate Game Maker

  • New Member
  • 28 posts

Posted 23 March 2004 - 12:19 AM

wow... great job. I'm sure this will be a huge success, used in games everywhere soon. A true piece of work
  • 0

#4 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 23 March 2004 - 12:24 AM

Unfortunately. I cannot connect to a remote MySQL database, it returns access denied. I have access (well I can access it through PHP).......
EDIT: btw I am using the console app that came with it... :D :D :D :( :(

Edited by maxd gaming, 23 March 2004 - 12:28 AM.


#5 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 23 March 2004 - 12:25 AM

Thanks guys. :D

Well... I hope it will be used, eventually. Not many game developers here will put a database online, even though MySQL is free for use.

What would be nice is that when one of the board's members decides to put for example a database online that stores highscore tables. Each game developer could get a table for his game and insert and retrieve the scores there. A kind of a Game Maker highscores database table.

Anyway, I should also say that I made only one of two DLLs - the bridge that connects to the MySQL C++ API and handles all input and output to Game Maker. The big work has still been done by MySQL AB.

Smarty

EDIT:

Unfortunately. I cannot connect to a remote MySQL database, it returns access denied. I have access (well I can access it through PHP).......


The reasons could be a case sensitive user name, password or database that you wish to connect to. It also happens if your host address is not a wildcard.

Edited by Smarty, 23 March 2004 - 12:27 AM.

  • 0

#6 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 23 March 2004 - 12:29 AM

It also happens if your host address is not a wildcard.

My host address a wildcard? what does that mean?

EDIT: here is the information my host gave me:

Username: database_name
Database name: database_name
Password: your database password
Database Host: 50free.net
Database Port: 3306

Here is what I am putting in

Host: 50free.net (I have also tried 50free.net:3306)
Username: maxdgaming_db
Password: My Password.

Edit2: here is my (well your) code

if !gmsql_connect("50free.net","maxdgaming_db","*******",'')
{
show_message(gmsql_errormessage());
game_end();
exit;
}

Edited by maxd gaming, 23 March 2004 - 12:33 AM.


#7 PromaneX

PromaneX

    Fixer of broken web things

  • New Member
  • 489 posts

Posted 23 March 2004 - 12:40 AM

MySql will only let certain "hosts" (or ip addresses) connect to the DB if your ip address is not one of these you cannot connect .
  • 0

#8 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 23 March 2004 - 12:40 AM

Well, you connected to the server, otherwise you wouldn't get an 'access denied'. I'm thinking that either you don't have the rights you think you have or the username or password, or both, are wrong.

The 'host' is your own ip or host address. MySQL stores usernames in the user@address format. Your should be maxdgaming_db@% (a wildcard) to allow you to log on from wherever you want.

Can you log on to the server with exactly the same credentials using the MySQL query tool (if you have it) ?

Smarty
  • 0

#9 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 23 March 2004 - 12:45 AM

Well, you connected to the server, otherwise you wouldn't get an 'access denied'. I'm thinking that either you don't have the rights you think you have or the username or password, or both, are wrong.

The 'host' is your own ip or host address. MySQL stores usernames in the user@address format. Your should be maxdgaming_db@% (a wildcard) to allow you to log on from wherever you want.

Can you log on to the server with exactly the same credentials using the MySQL query tool (if you have it) ?

Smarty

Well, I just tried maxdgaming_db@50free.net and maxdgaming_db@% neither of which worked. Same errors. I do not have this "query tool" but using php I can log on and using phpmyadmin I can log on....


Edit: Arrgh this really sucks, i was hoping to get my highscore system set up tonite before I had to leave... I have to leave in about 15 minutes now, maybe enough time to get this fixed... :D

Edited by maxd gaming, 23 March 2004 - 12:47 AM.


#10 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 23 March 2004 - 12:49 AM

You can't use your host location in the username - MySQL will tell where you are by your connection and decide whether or not you are a valid user.

Those PHPs may be executed from the server location itself. In other words, they are not worth a test because you really can't tell the security settings used with the PHP scripts.

Smarty
  • 0

#11 PromaneX

PromaneX

    Fixer of broken web things

  • New Member
  • 489 posts

Posted 23 March 2004 - 12:50 AM

Arrgh this really sucks, i was hoping to get my highscore system set up tonite before I had to leave... I have to leave in about 15 minutes now, maybe enough time to get this fixed... 

If you get stuck with your DB then i will set you an account up on my sever to allow you from any host
  • 0

#12 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 23 March 2004 - 12:50 AM

OH! I see now.... well, I need a reliable database then, cause i betchu it is the security is too high... :( :( :(

Promane I pm'd you. ^_^

Edited by maxd gaming, 23 March 2004 - 12:52 AM.


#13 teenman

teenman

    GMC Member

  • Retired Staff
  • 20 posts

Posted 23 March 2004 - 12:52 AM

PLEASE REMEMBER THAT SOME HOSTS WILL ONLY ALLOW YOU TO CONNECT VIA LOCALHOST. This is a security issue set on most hosts, not allowing outside connections. Some hosts however, give you the option of allowing outside connections to a MySQL DB (but usually that's only with pay hosts...)
  • 0

#14 Guest_maxd gaming_*

Guest_maxd gaming_*
  • Guests

Posted 23 March 2004 - 12:53 AM

PLEASE REMEMBER THAT SOME HOSTS WILL ONLY ALLOW YOU TO CONNECT VIA LOCALHOST.  This is a security issue set on most hosts, not allowing outside connections.  Some hosts however, give you the option of allowing outside connections to a MySQL DB (but usually that's only with pay hosts...)

Yep, I got that now. I didn't realize that......

::Promane I pm'd you.

Edited by maxd gaming, 23 March 2004 - 12:55 AM.


#15 PromaneX

PromaneX

    Fixer of broken web things

  • New Member
  • 489 posts

Posted 23 March 2004 - 12:56 AM

Smarty can it be made to work with a proxy ? im using GPRS through my mobile phone for my internet
  • 0

#16 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 23 March 2004 - 01:10 AM

I haven't tried it on a proxy, and I am not familiar with configuring one. The system does not depend on HTML pages, so there's no caged information on a proxy. You need a proxy/firewall setup that tunnels the IP packages back and forth between your computer and the server.

Try it and know it. ^_^

Smarty
  • 0

#17 PromaneX

PromaneX

    Fixer of broken web things

  • New Member
  • 489 posts

Posted 23 March 2004 - 01:16 AM

It wont do it , it's just trying to go direct to my server , and my isp wont let it nvm lol i'll fix it at some point ^_^

i would like to start i site giving users of your dll a db to use on my server would that be ok with you? want to be a partner in the site?
  • 0

#18 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7218 posts
  • Version:GM:Studio

Posted 23 March 2004 - 01:23 AM

i would like to start i site giving users of your dll a db to use on my server would that be ok with you? want to be a partner in the site?


Hey, this is what I want people to start doing. All you need is my permission to use GMSQL 1.0, and by putting it online here you basically have it. What project you set up with it is your business.

Since I am not really a hero on managing sites and databases, I think I'll skip the invitation. Thanks anyways. ^_^

Smarty
  • 0

#19 PromaneX

PromaneX

    Fixer of broken web things

  • New Member
  • 489 posts

Posted 23 March 2004 - 01:35 AM

Great thanks ill start work in the site right away ^_^ still think you should be a part of it tho :( haha
  • 0

#20 SkaterD

SkaterD

    Bloody Stick

  • New Member
  • 108 posts

Posted 23 March 2004 - 01:40 AM

AHHHHHHHHHHHHHHH!
I LOVE IT!
WAHHHHHHHHHHHHH!
YOU ROCK!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users