WASSIm. Posted May 13, 2013 Posted May 13, 2013 hi all. console show me this dbConnect failed; Can't connect to MySQL server on 'mysql8.000webhost.com' (10060) -- Connection functions local connection = nil local function connect( ) connection = dbConnect( "mysql", "dbname=a5714069_server;host=mysql8.000webhost.com", "a5714069_server", "aaaaaa1", "share=1" ) if connection then outputConsole ( "Server is now connected with the MySQL database!", 1 ) return true else outputConsole ( "Connection with the MySQL database failed!", 1 ) return false end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), connect ) -- Exported functions function query( ... ) if connection then local qh = dbQuery( connection, ... ) local result = dbPoll( qh, -1 ) return result else return false end end -- Get a single row from the database function querySingle( str, ... ) if connection then local result = query( str, ... ) if type(result) == 'table' then return result[1] end return result else return false end end -- DB exec as used function exec( str, ... ) if connection then local qh = dbExec( connection, str, ... ) return qh else return false end end
xXMADEXx Posted May 13, 2013 Posted May 13, 2013 Because, web servers have firewalls, they don't allow other connections. I am familiar with 000webhost, the only way to let remote connections connect, is by donating. You can contact them for more info.
WASSIm. Posted May 13, 2013 Author Posted May 13, 2013 Because, web servers have firewalls, they don't allow other connections. I am familiar with 000webhost, the only way to let remote connections connect, is by donating. You can contact them for more info. you know other site free host ?
xXMADEXx Posted May 13, 2013 Posted May 13, 2013 Because, web servers have firewalls, they don't allow other connections. I am familiar with 000webhost, the only way to let remote connections connect, is by donating. You can contact them for more info. you know other site free host ? Most if not all web hosters have blocked firewalls. You will just have to pay, or keep searching until you can find one that will let you use a remote connection. unfortunately, i havn't had any luck with it.
DiSaMe Posted May 13, 2013 Posted May 13, 2013 Why not to run MySQL in your computer (assuming that's where you run MTA server)?
Woovie Posted May 14, 2013 Posted May 14, 2013 Why not to run MySQL in your computer (assuming that's where you run MTA server)? +1 Use wamp or xampp. Or just use the SQLite3 built into MTA.
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