darhal Posted February 12, 2016 Share Posted February 12, 2016 (edited) Hello everyone since i m newbie in MySQL i made a db in 000webhosting and those stuff i can access the db from phpAdmin and when io try to connect it output cant connect to MySQL (110) here is pic of error : here is my code : local db = dbConnect("mysql", "dbname=********;host=mysql7.000webhost.com", "a2062594_test", "*********") HELP PLEASE i have more exp in sqlite than mysql Edited February 13, 2016 by Guest Link to comment
1LoL1 Posted February 12, 2016 Share Posted February 12, 2016 Hello everyone since i m newbie in MySQL i made a db in 000webhosting and those stuff i can access the db from phpAdminand when io try to connect it output cant connect to MySQL (110) here is pic of error : here is my code : local db = dbConnect("mysql", "dbname=********;host=mysql7.000webhost.com", "a2062594_test", "*********") HELP PLEASE i have more exp in sqlite than mysql Try this: db_name = "db" host = "host" user = "user" password = "pass" db = dbConnect( "mysql", "dbname="..db_name..";host="..host, user, password ) Link to comment
darhal Posted February 12, 2016 Author Share Posted February 12, 2016 Basiclly it's the same so still getting same error after trying Link to comment
Saml1er Posted February 12, 2016 Share Posted February 12, 2016 000webhost does not accept remote connections if you're using the free version. It might not allow you to connect to db. Link to comment
tosfera Posted February 12, 2016 Share Posted February 12, 2016 000webhost does not accept remote connections if you're using the free version. It might not allow you to connect to db. That's correct, 000webhost is a freehost and took a lot of your rights away. The SQL servers there are only accepting connections from their own servers and localhost. You'll not be able to use their storage as your database. Try setting up wamp/xampp. It gets the job done. Link to comment
Alexs Posted February 13, 2016 Share Posted February 13, 2016 Also db4free.net will work. Link to comment
ozulus Posted February 13, 2016 Share Posted February 13, 2016 Also hostinger.com will work.. I am using for my php scripts which uses mysql to getting data and there is no problem with connection. Link to comment
SpecT Posted February 13, 2016 Share Posted February 13, 2016 Also hostinger.com will work.. I am using for my php scripts which uses mysql to getting data and there is no problem with connection. Hostinger is almost the same as 000webhost. To get remote MySQL you need to pay. The only way you can access the MySQL is to use their servers. Link to comment
darhal Posted February 13, 2016 Author Share Posted February 13, 2016 000webhost does not accept remote connections if you're using the free version. It might not allow you to connect to db. That's correct, 000webhost is a freehost and took a lot of your rights away. The SQL servers there are only accepting connections from their own servers and localhost. You'll not be able to use their storage as your database. Try setting up wamp/xampp. It gets the job done. any usefull tutorials on how to do that Link to comment
Simple0x47 Posted February 13, 2016 Share Posted February 13, 2016 000Webhost doesn't allow external sql connections so here's my recomendation.http://www.db4free.net It's a mySQL database free provider for testing uses. Just make your account there and insert the info in your script. Link to comment
darhal Posted February 13, 2016 Author Share Posted February 13, 2016 Also db4free.net will work. Oh thank you but how much time it takes to create the db ?. Link to comment
darhal Posted February 13, 2016 Author Share Posted February 13, 2016 Okay guys i create account in db4free but how can i know the host ? Link to comment
Alexs Posted February 13, 2016 Share Posted February 13, 2016 Okay guys i create account in db4free but how can i know the host ? The hostname is db4free.net Link to comment
tosfera Posted February 13, 2016 Share Posted February 13, 2016 There is however another way on how to do it on 000webhost. The thing about that is though.. you'll need to call everything with a PHP script and it'll take quite long. Link to comment
darhal Posted February 13, 2016 Author Share Posted February 13, 2016 BIG THANKS TO YOU GUYS IT WORKS NOW sorry for being noob at MySQL 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