Sil3nT Posted March 7, 2014 Share Posted March 7, 2014 Hello. I have script where i need mysql and database. Thas okay. But when i start script then in console outputs this ERROR: mgm\server.lua:9 dbConnect failed; Can't connect to MySql server on 'localhost' (10061) This is that lua file server = {} server.__index = server server.connection = dbConnect( "mysql", "dbname=elitedeh_my;host=localhost", "root", "" ) if ( server.connection ) then outputDebugString("Connection to database successful") else outputDebugString("Connection to database failed") end And yeah i tried 000webhost mysql and again that problem. I just think i have writed wrong lua Link to comment
WASSIm. Posted March 7, 2014 Share Posted March 7, 2014 localhost its mean mysql server same host mta server and you can't use mysql server 000webhost Link to comment
Sil3nT Posted March 7, 2014 Author Share Posted March 7, 2014 Then , is there nsome normal mysql hosting program or company? Link to comment
pa3ck Posted March 7, 2014 Share Posted March 7, 2014 000webhost is fine, just change 'localhost' to it's IP address. 'localhost' means you are running MySQL on the same computer, but you are obviously not. Link to comment
Sil3nT Posted March 7, 2014 Author Share Posted March 7, 2014 000webhost is fine, just change 'localhost' to it's IP address. 'localhost' means you are running MySQL on the same computer, but you are obviously not. so i need to change localhost to servers ip adress? Link to comment
BlueBerry Posted March 7, 2014 Share Posted March 7, 2014 Yeah, change it to the mysql server ip. Link to comment
Castillo Posted March 13, 2014 Share Posted March 13, 2014 000webhost doesn't accept remote connections. Link to comment
K4stic Posted March 13, 2014 Share Posted March 13, 2014 (edited) localhost its mean mysql server same host mta server and you can't use mysql server 000webhost Seriously -.-" MySQL is online Databse you can connect to it remotely like i have an hosted domain who have give me 4 MySQL and i connect then to my Server. My Server and Web Host server aren't the same Company SQL is LocalHost and not MySQL Also yes 000webHost not accept Remote Connections Edited March 15, 2014 by Guest Link to comment
Moderators Citizen Posted March 14, 2014 Moderators Share Posted March 14, 2014 SQL is LocalHost not MySQL Not sure if you didn't explained correctly due to your english skill or if you are really doing a comparison between both of them. Link to comment
K4stic Posted March 15, 2014 Share Posted March 15, 2014 SQL is LocalHost not MySQL Not sure if you didn't explained correctly due to your english skill or if you are really doing a comparison between both of them. Sorry for That and for my bad English Skills read it again i modify it Link to comment
Moderators Citizen Posted March 15, 2014 Moderators Share Posted March 15, 2014 Sorry for That and for my bad English Skills read it again i modify it Well, it's still there: SQL is LocalHost and not MySQL What do you mean by that ? Link to comment
K4stic Posted March 15, 2014 Share Posted March 15, 2014 Sorry for That and for my bad English Skills read it again i modify it Well, it's still there: SQL is LocalHost and not MySQL What do you mean by that ? localhost its mean mysql server same host mta server i explain that local host isn't mean MySql server to be same with Mta server Host That MySQL can be and on other Host That only SQL need to be in Same Host of Mta Server as it's a file Link to comment
pa3ck Posted March 15, 2014 Share Posted March 15, 2014 Sorry for That and for my bad English Skills read it again i modify it Well, it's still there: SQL is LocalHost and not MySQL What do you mean by that ? localhost its mean mysql server same host mta server i explain that local host isn't mean MySql server to be same with Mta server Host That MySQL can be and on other Host That only SQL need to be in Same Host of Mta Server as it's a file No, you are wrong and he is right. Localhost means you are hosting it locally, so it is running on the same machine. You can of course change localhost with the other machines IP, but if you leave it as localhost or 127.0.0.1, then it should be running on the same machine. Link to comment
Moderators Citizen Posted March 15, 2014 Moderators Share Posted March 15, 2014 Sorry for That and for my bad English Skills read it again i modify it Well, it's still there: SQL is LocalHost and not MySQL What do you mean by that ? localhost its mean mysql server same host mta server i explain that local host isn't mean MySql server to be same with Mta server Host That MySQL can be and on other Host That only SQL need to be in Same Host of Mta Server as it's a file SQL is just a language that SQL based applications can understand. There is a lot of SQL servers mike MySQL, postgre and others. You probably meant SQLite witch let you do the same things but the database is stored as a .db file. SELECT * FROM users; is a SQL query and can be executed on MySQL or SQLite. Hope it's more clear. 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