Jump to content

using remote database locally


i3i2uno
 Share

Recommended Posts

Hello,

I am relatively new to processwire, but so far it has seemed like a dream come true in regards to a CMS that my clients can actually use.

I've setup my project locally and I have done an average amount of development. I want to load the server to a live test account so that my client can see it. I loaded all the files to the server, and I created a mysql database. Did an import, grabbed the database connection information, and would like to use the remote database within my local development environment. So I just changed the config file to fit the information, but it can't connect to the the remote database. Keep in mind this is a MySQL database hosted by godaddy (they always seem to have different rules)

The site when loaded on a live test server won't load either. A 500 error is thrown on both accounts. I have double and triple checked that my config information is correct, so I am quite sure that is not the issue(at least when talking about the host, name, user, pass, etc).

One thing that I am a little unsure of is does processwire have an issue with MySQL 5.0? Because that is what the database is running on with the Godaddy account. The MySql on my local Xampp server is 5.5.32 and runs fine when using the local database. Could this be the issue?

I am going to continue to troubleshoot, and its probably just some error that I am overlooking, but just wanted to reach out to you guys and see if you had any ideas.

Thanks!

Link to comment
Share on other sites

Hi i3i2uno,

Welcome to PW and to the forums :)

MySQL could indeed be the issue regarding the 500 error. As per the requirements, PW needs MySQL 5.0.15 or greater (later versions of 4.x may also work). It could be other stuff as well, .htaccess. Did that transfer correctly? is it named correctly? Maybe the rules there are conflicting with GoDaddy server? Missing files? 

As for connecting to a remote db, never tried that so can't comment :)

Edit:

Some GoDaddy issues here:

http://processwire.com/talk/topic/1962-cant-reach-admin-page/

http://davidwalsh.name/mod_rewrite-htaccess-godaddy

Possibly related/or for info

http://processwire.com/talk/topic/82-install-pw-to-subdir/

http://processwire.com/talk/topic/3258-moving-website-from-local-server-to-a-sub-domain/

Edited by kongondo
  • Like 3
Link to comment
Share on other sites

so I contacted godaddy and apparently MySQL is version 5.0.96 so that shouldn't be the problem. 

Also, I already went through most of the links that you provided to no help. Thanks though.

As for the .htaccess file and all files being loaded correctly they are all there, no problems (at least not what I can figure). 

I've never actually done this with xampp/apache servers so maybe it can't be done? I run local testing environments with IIS and .NET all the time while connecting to databases remotely. I was hoping I could do the same with this apache/xampp. Maybe not?

Link to comment
Share on other sites

Look what Google found :)

http://bahalul.net/xampp-mysql-server-remote-access/

http://www.apachefriends.org/f/viewtopic.php?f=16&t=47438

http://xlinesoft.com/blog/2012/04/17/video-connection-to-remote-mysql-xampp-installation-ftp-upload/

.htaccess

Did you confirm that its rules are not conflicting with your server requirements?

Are you able to access PW admin btw? (on GoDaddy). I ask because you say the "site" won't load. Any errors in PW logs (/site/assets/logs/errors.txt? 

Edited by kongondo
Link to comment
Share on other sites

@kongondo, thank you for your help. Basically what it boiled down to was my ignorance. lol. And my lack of patience and/or eagerness to continue development instead of reading instructions. But incase anyone that visits this thread is experiencing the same problems, here you go:

So first off, if you want to use a remote MySQL database when developing locally you need to make sure that you create the DB so that you have outside access (this is an advanced option with godaddy). Once you do this, it is relatively straightforward. Just plug in your DB information into the config file and you should be okay. Even with relatively stock my.ini settings in the XAMPP config it seems to work...

As for the reason its not loading on the live server, its because I failed to read the email that godaddy sent saying that the ftp server is ready, but my files/site won't be visible for another 24-28 hours... Hopefully it will work shortly.

Anyways thanks again @kongondo for the help...

  • Like 1
Link to comment
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
 Share

×
×
  • Create New...