pocobueno1388 Posted July 9, 2010 Share Posted July 9, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/ Share on other sites More sharing options...
xcandiottix Posted July 9, 2010 Share Posted July 9, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083690 Share on other sites More sharing options...
pocobueno1388 Posted July 9, 2010 Author Share Posted July 9, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083694 Share on other sites More sharing options...
xcandiottix Posted July 9, 2010 Share Posted July 9, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083697 Share on other sites More sharing options...
pocobueno1388 Posted July 9, 2010 Author Share Posted July 9, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083706 Share on other sites More sharing options...
tronicsmasta Posted July 9, 2010 Share Posted July 9, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083708 Share on other sites More sharing options...
pocobueno1388 Posted July 9, 2010 Author Share Posted July 9, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207267-connecting-to-database/#findComment-1083710 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.