Jump to content
xisto Community
Sign in to follow this  
iGuest

MySQL Url

Recommended Posts

always I have to use localhost? or there is a URL for mysql?

1064323833[/snapback]


You can still use "localhost" on your websites here unless you are trying to access it remotely which may not be possible. The remote permissions have probably been set to disallow.

 

I always just use "localhost" as IP addresses can change but "localhost" will always be where your script is. Therefore, I reccomend continueing to use "localhost" as the location of your MySQL server.

 

I wouldn't even know where to begin to specify the location of the MySQL server on the hosting server as there are many accounts on there. I think that the MySQL server location is probably 69.50.168.69 currently to answer your question though.

 

Hope this helps. B)

 

vujsa

Share this post


Link to post
Share on other sites

As far as i know, you dont need to always use 'localhost', its just the easier and more desired. Obviously if you were really advanced you would be able to do it the other way by putting the IP address or the URL.For people that don't have much experience or knowledge about the webserver for the MySQL databases, then i would suggest leaving it at 'localhost'.

Share this post


Link to post
Share on other sites

Localhost = 127.0.0.1 So in fact to connect to a database you always need to use the address. It just happens to be that the database server is located behind the same IP address and thus localhost, which means the address 127.0.0.1, can be used.

Share this post


Link to post
Share on other sites

Localhost = 127.0.0.1

 

So in fact to connect to a database you always need to use the address. It just happens to be that the database server is located behind the same IP address and thus localhost, which means the address 127.0.0.1, can be used.

1064324362[/snapback]


couldn't you also use your dns:3306, or maybe your subdomain.host:3306

 

 

$db = mysql_connect("Xisto.com:3306", "user", "pass");

I have an account @ cogia.net and it hosts mysql, but it's strange because it limits the free accounts to one database, so I haven't actually tried it with Xisto. Someone give it a go and tell me how it goes.

 

 

BTW here's what I use for cogia.net and it works fine.

$conn = mysql_connect("cogia.net:3306", "mydbname", "pass");

Cogia uses the db name as your user and database.

Share this post


Link to post
Share on other sites

it limits the free accounts to one database

loot at your cpanel at Xisto, you will see your limits.I am currently using 7 databases, and I am allowed up to 99.
Of course, my free account will probably not have anouth megs for 99 databases, however you clearly can have several databases, as long as you don't exhaust the free space you are allowed.
Regards
yordan

Share this post


Link to post
Share on other sites

loot at your cpanel at Xisto, you will see your limits.

I am currently using 7 databases, and I am allowed up to 99.

Of course, my free account will probably not have anouth megs for 99 databases, however you clearly can have several databases, as long as you don't exhaust the free space you are allowed.

Regards

yordan

1064324502[/snapback]


Sorry, I must've written my message the wrong way. I don't have an Xisto account. I find it hard to juggle college, work, and just got married. (not to mention dial-up internet) I have to admit if I had broadband then it would be easier to remain an active member. Cogia.net however provides free php/mysql support with ad banners. I admit Xisto is a much better source, and I would engage in it if it weren't for my ability to remain absent from the net for weeks at a time.

 

I was referring to cogia.net when i said

 

it limits the free accounts to one database

The point of this tho was just stating that if you have mysql and php on the same server. You would use the same ip, but a different port, correct? MySql usually is on port 3306 if I'm not mistaken. I'm kinda new to this whole thing, but that's just my 2 cents.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.