4

Similar to how the IETF's example.com domain's web and email services can be safely used in code samples, is there a public MySQL server I can safely(*) use in some sample code?

("Safe" in that it wouldn't mind the minuscule amount of traffic users of my sample code would generate, and is likely to remain accessible over the next few years.)

Hennes
  • 65,142
smokris
  • 1,602

3 Answers3

7

Well, you can use the site : http://www.db4free.net/ which allows you to sign to get a free database.

It's not for production but it's good for testing and I created a database years ago and it still works.

Note : I don't know if it will handle connections from the same user from different URLs without banning the account or not.

5

example.com is not intended to be functional in any way, it is simply intended to be safe for use in documentation. Any software that uses it will most likely generate error messages to the end user.

You could use mysql.example.com in your documentation sample code. Readers of that documentation sample code should NOT expect there to be a functioning MySQL service at that address. Readers should expect that they have to replace mysql.example.com with the name of their own MySQL server.

1

There are no safe public DB servers because it would mean that it would have to be configured to be open to everyone. -> Everyone could manipulate all available data...

If you need a working sample server you have to set it up yourself and assign the proper access rights.

Carl B
  • 6,650
udo
  • 8,011
  • 1
    I had in mind that there might be some public read-only MySQL servers available, upon which one could perform SELECT queries. In the same way that there are numerous public HTTP servers available, upon which one can perform idempotent GET queries. – smokris Dec 29 '11 at 15:02
  • OK, got it. I interpreted it the other way around ;) – udo Dec 29 '11 at 15:46
  • 1
    take a look at this: http://www.ensembl.org/info/data/mysql.html maybe it works for you – udo Dec 29 '11 at 15:51