MR.GRAND Posted May 11, 2016 Share Posted May 11, 2016 Hello guys i have this code local RentDataBase = dbConnect("mysql", "dbname=" .. 'sql6119060' .. ";host=" .. 'sql6.freemysqlhosting.net' .. 'port=' .. '3306', 'sql6119060', 'd9ScRNHhPA') dbQuery( RentDataBase, ' CREATE TABLE IF NOT EXISTS `sql6119060` (userSerial,userName,expiredIN) ' ) it's working 100% on my local server but on vps host server it's does not work ?? can u help ? i've added the script to admin and does not work Link to comment
GTX Posted May 11, 2016 Share Posted May 11, 2016 Debugscript? And check your server console, you may have a socket error. Link to comment
MR.GRAND Posted May 11, 2016 Author Share Posted May 11, 2016 Debugscript? And check your server console, you may have a socket error. Debug say ; dbConnect failed ... could not connect Link to comment
spoty Posted May 11, 2016 Share Posted May 11, 2016 Debugscript? And check your server console, you may have a socket error. Debug say ; dbConnect failed ... could not connect do your vps allow mysql connection's? Link to comment
MR.GRAND Posted May 11, 2016 Author Share Posted May 11, 2016 Debugscript? And check your server console, you may have a socket error. Debug say ; dbConnect failed ... could not connect do your vps allow mysql connection's? How to do that ? Link to comment
spoty Posted May 11, 2016 Share Posted May 11, 2016 Debug say ; dbConnect failed ... could not connect do your vps allow mysql connection's? How to do that ? buy a vps that support's incoming and outcoming mysql connections not all vps have that Link to comment
MR.GRAND Posted May 11, 2016 Author Share Posted May 11, 2016 Debug say ; dbConnect failed ... could not connect do your vps allow mysql connection's? How to do that ? buy a vps that support's incoming and outcoming mysql connections not all vps have that lol i have normal vps host for game servers and i have a server on it can u know how to access mysql connect ? on that server Link to comment
spoty Posted May 11, 2016 Share Posted May 11, 2016 Debug say ; dbConnect failed ... could not connect do your vps allow mysql connection's? How to do that ? buy a vps that support's incoming and outcoming mysql connections not all vps have that lol i have normal vps host for game servers and i have a server on it can u know how to access mysql connect ? on that server just like i sayed NOT ALL VPS have the option to ALLOW MYSQL Connection Search a new vps that allows it Link to comment
KariiiM Posted May 11, 2016 Share Posted May 11, 2016 dbQuery( RentDataBase, ' CREATE TABLE IF NOT EXISTS `sql6119060` (userSerial,userName,expiredIN) ' ) Also, use dbExec for creating a new table/ updating and inserting Link to comment
Noki Posted May 15, 2016 Share Posted May 15, 2016 KariiiM, I feel you could expand on your answer and explain why. So basically, whenever you want to get a result in SQL, we use the dbQuery function. That is commonly used with the SELECT clause. If you don't need to get a result (like when you update a table, change a setting, creating a new table etc), you can just use dbExec. dbQuery returns a handler and dbExec just returns a boolean value. It's faster to use dbExec (by a very little amount), but remember you won't get a result from it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now