Jump to content

Connecting to Database


pocobueno1388

Recommended Posts

I know this sounds like an issue I should take up with GoDaddy, but I've tried calling them and they can't help me.

 

I have two websites that each have there own database. I'm basically just trying to take information from one database, and insert it into the other.

 

From website #1 I am trying to connect to the database on website #2. This has worked flawlessly for me on two other sites already doing the same exact thing with the same database. But for some reason on this particular website it won't let me connect to the other database, although it let me with the others.

 

To me it sounds like some sort of security setting on this website that won't let me have outside connections, I wouldn't know where to find this or fix it though.

 

Like I said, I know the connection code is fine as it's worked perfect on other sites and it's just copied and pasted. So does anyone know what this could be? Any help would be greatly appreciated!

Link to comment
Share on other sites

If you are using the "/home/username/u/s/e/r/html/" string to access the database I am pretty sure that you must be on the local machine. If your sites are hosted on 3 different machines at godaddy I'm not sure you could cross access the databases between 2 different machines. By chance are you getting an HTML HEADERS error or something? Or will it just not connect?

Link to comment
Share on other sites

Both of the sites are hosted with GoDaddy on the same account. As I said, I've already been doing this same thing with other sites on my GoDaddy account connecting to this same database.

 

When I put the connection code in, the page takes forever to load and says:

 

This webpage is not available.

 

The webpage at http://www.collisionmasters.com/transferdb.php might be temporarily down or it may have moved permanently to a new web address.

 

And if I delete the connection code, it's fine.

Link to comment
Share on other sites

Maybe in the godaddy settings of the db you are trying to access you have to add another user? Sometimes I've had to do that... otherwise i'm not sure what it could be. Godaddy's help line won't give help if it's a "coding problem" i.e. your php is set wrong. So, i'd guess it's something on your end rather then theirs but who knows.

Link to comment
Share on other sites

I definitely think it has something to do with needing to add a user with permissions. The only thing is I am logging into the database as the ONLY user created...and for some reason I don't have permission to add a new user...something is not right.

Link to comment
Share on other sites

if i am not mistaken, godaddy will use the same server for all your domains, but different servers for your databases.... notice each time you make a database you get a location of something like 371637sdhv838.mysql.godaddy.com <-- not the same format but you get the idea...

 

you can try to add a new user to your second database but their mysql servers do not allow outside connections.... and i think you cant even connect to the database if your not under the same domain...

 

ie:

 

bluemoon_db on jjksdfkjf.godaddy.com from domain bluemoonisgreat.com wont beable to connect to newcastle_db on j3hgjek.godaddy.com from domain newcastleisbetter.com because of the connection limitations they set for security purposes...

 

try a new user but i still dont think it will work. you can always temporarily move 1 site to another in a subdirectory pull the info you want, insert it into your other database as different table names and use that modified database...

 

i can help you merge them if you like.

Link to comment
Share on other sites

If GoDaddy does not allow outside connections, then how would you explain me doing it exactly the same way with two other sites I'm hosting on the same account with GoDaddy??

 

I can't even create a user in this database because it says I don't have the privilege, which doesn't make sense since I am the default user.

 

I think I'm going to backup the database, delete it, and re-create it. Maybe that will solve the problem.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.