276 posts
Location
Fairbanks, Alaska
Posted 21 June 2016 - 05:35 AM
I think I've created something cool for everyone :)/>
I don't know why someone would have a purpose for it, but it is quite cool.
Basically you can connect to a MySQL database and give it a query, and it returns values :D/>
Basically I set up a bridge on one of my servers so that you can send a post request to it containing the credentials and query, and it returns rows if you had a SELECT query sent against the database, or something similar.
Pastebin for utility:
9CAHmXXr
Also, the server returns the rows in the JSON format, so you have to use a decoder.
Luckily I found one made by
ElvishJerricco, and since I don't want to directly distribute the utility in my own post, i'll just give a link to the post
.
The amazing tool was created by the awesome
ElvishJerricco.
To-do list:
Spoiler
I don't have any ideas yet.Change logs:
Spoiler
V1.1: 9CAHmXXr
*Changed query to queryDatabase
-Added queryServer, which is for doing things on a MySQL server, but not in a database itself.
V1.0: uZ6bCcjN
First release. Woot
Edited on 21 June 2016 - 05:49 AM
149 posts
Location
The dark depths of the web
Posted 21 June 2016 - 05:42 AM
Sounds awesome and useful for people!
Your "The amazing tool" link actually links to "The%20Amazing%20tool"…I think you meant this:
http://www.computercraft.info/forums2/index.php?/topic/5854-json-api-v201-for-computercraft
276 posts
Location
Fairbanks, Alaska
Posted 21 June 2016 - 05:55 AM
Sounds awesome and useful for people!
Your "The amazing tool" link actually links to "The%20Amazing%20tool"…I think you meant this:
http://www.computerc...r-computercraft
Yeah xD
I'll fix that.
276 posts
Location
Fairbanks, Alaska
Posted 21 June 2016 - 06:22 AM
HMMMMMM
I might make something similar to PhpMyAdmin
LuaMyAdmin? ;)/>
6 posts
Posted 14 July 2016 - 03:12 AM
323 posts
Location
Boston, MA
Posted 14 July 2016 - 06:12 AM
This is cool, but, unless I understand this wrong, can't someone edit the file and see the db username and password?
6 posts
Posted 14 July 2016 - 10:35 AM
This is cool, but, unless I understand this wrong, can't someone edit the file and see the db username and password?
you mean like literally every other lua mysql wrapper?
that's why you do mysql queries in a place nobody can access and if someone who u dont want accessing the sql to query, u network it.
160 posts
Location
Probably within 2 metres of my laptop.
Posted 14 July 2016 - 11:38 AM
This is cool, but, unless I understand this wrong, can't someone edit the file and see the db username and password?
you mean like literally every other lua mysql wrapper?
that's why you do mysql queries in a place nobody can access and if someone who u dont want accessing the sql to query, u network it.
Even more fun… Overwrite fs.isReadOnly and fs.open to prevent people from reading / writing.
44 posts
Posted 15 July 2016 - 05:23 PM
This is cool, but, unless I understand this wrong, can't someone edit the file and see the db username and password?
you mean like literally every other lua mysql wrapper?
that's why you do mysql queries in a place nobody can access and if someone who u dont want accessing the sql to query, u network it.
Just remember you are doing this all through bluebirds websites so you are trusting him with your database info. So you know, don't use any important databases.
256 posts
Posted 15 July 2016 - 06:07 PM
Just remember you are doing this all through bluebirds websites so you are trusting him with your database info. So you know, don't use any important databases.
i can see this being a
major no-thank-you - thanks for bringing this to attention
Edited on 15 July 2016 - 04:07 PM