Edward Posted March 29, 2007 Share Posted March 29, 2007 Hi, I was wondering if I can connect to the databases set up at mysite.com while testing the pages via my local network, eg. mylaptop.local Can I make the page I'm viewing think it is being viewed from mysite.com, or can I enter some alternative to 'localhost' in my connection string? This is because I don't have MySQL or phpMyAdmin set up on my laptop and I currently have to upload my php pages to test them which is very time consuming. Thank you. Link to comment https://forums.phpfreaks.com/topic/44851-connecting-to-databases/ Share on other sites More sharing options...
marcus Posted March 29, 2007 Share Posted March 29, 2007 Get WAMP or XAMPP. Link to comment https://forums.phpfreaks.com/topic/44851-connecting-to-databases/#findComment-217813 Share on other sites More sharing options...
Lytheum Posted March 29, 2007 Share Posted March 29, 2007 You mean like connecting to a remote DB? Sorta - as it's not really that remote. Anyway: MYSQL_CONNECT("mysite.com","db_name","pass_word") Or you can use the IP address of mysite.com if you need to. The only problem is, chances are your MySQL is setup to disallow remote connections. It's a process to get it configured right..here's a page I found on it. http://kb.swsoft.com/article_23_1134_en.html Link to comment https://forums.phpfreaks.com/topic/44851-connecting-to-databases/#findComment-217822 Share on other sites More sharing options...
Edward Posted March 30, 2007 Author Share Posted March 30, 2007 Thank you very much both of you. I'm a Mac user so I get the mac equivilent for WAMP (unsurprisingly called MAMP), it's excellent! Exactly what I needed and so easy to use, thanks a lot! Link to comment https://forums.phpfreaks.com/topic/44851-connecting-to-databases/#findComment-218165 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.