Jump to content

[SOLVED]Cant connect to MySQL db 110..


darhal

Recommended Posts

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 :

Z9a2ZAT.png

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 by Guest
Link to comment
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 :

Z9a2ZAT.png

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
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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...