ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Hook up Database to Expression Engine

August 03, 2010 8:39pm

Subscribe [5]
  • #1 / Aug 03, 2010 8:39pm

    Saroshv

    87 posts

    I’m not quite sure where this thread belongs.

    Here’s what I need help on:

    I have Expression Engine Installed on a Linux GoDaddy Server with a MySQL Database. I would like to transfer the entire website to a computer for internal use only (not hooked up to the Internet, but accessible to other computers in the system). How do I go about doing this? Should I use XAMPP? Whats the step-by-step process?


    Thanks!

  • #2 / Aug 03, 2010 10:50pm

    Saroshv

    87 posts

    Alright, I think I figured out how to install and use XAMPP.


    How can I take a preexisting website (EE) hosted on GoDaddy, and put it on XAMPP?

    I am also having trouble with the database.

  • #3 / Aug 04, 2010 8:45am

    carvingCode

    380 posts

    You’ll need to export/import the database from GD to your XAMPP site.  You’ll need to move the templates.  Finally, you’ll need to update your config.php for database and change your paths in the Control Panel.

  • #4 / Aug 04, 2010 1:05pm

    Brian M.

    529 posts

    I currently use XAMPP with good success (and was developing pre-OS X so have done quite a few different setups over the years, most of which I now forget).  I know a lot of people use MAMP as well, which I think keeps things like httpd.conf in their default location rather than within the XAMPP application itself, but in the end I don’t think it matters.

    In a nutshell what you should do is install XAMPP and get that running (can’t remember the steps but it should be pretty straight forward).  You’ll need to modify the httpd.conf file to point to the directory you want to be the root folder of your website (I keep my sites in /Library/Webserver/Documents just to keep things like the default OS X install, but you could really put it/them anywhere).  httpd.conf is located in the etc folder within the xampp folder.

    You’ll need to download your site files from the live server and stick them wherever you have indicated in the httpd.conf file.  You’ll then need to import a copy of the database to your MySQL on your machine.  I have a copy of phpMyAdmin on my machine that I use, but you could also use a variety of native OS X MySQL front-end applications to do it (haven’t used them in a few years so not sure what’s out there and good).

    At that point you’re pretty much done.  Depending on your local environment vs your remote one you might be done, or you might need to modify the config.php EE file on your local copy to override the username/password or certain paths.

    That’s it in a nutshell.  If you haven’t done it before it might take some experimentation, but the reward is pretty obvious and once you get used to it, it’s pretty easy.

  • #5 / Aug 04, 2010 3:32pm

    Saroshv

    87 posts

    Alright…

    1. I am having some trouble with the importing part to XAMPP. I sucessfully exported the database (a single .sql file). But when I go to import on XAMPP, it doesn’t show that file. Any thoughts?

    I might have some questions about the templates etc. But first thing’s first.

  • #6 / Aug 04, 2010 3:39pm

    Saroshv

    87 posts

    Wow! Thanks for the information!

    1. I am having some trouble importing the database. I can export from GoDaddy (a single .sql file) but I can’t seem to import to XAMPP (it doesn’t show up when importing).

    2. I also cannot locate the httpd.conf file. There is no ‘etc’ folder. Perhaps this newer version of XAMPP is different?


    Thanks!

  • #7 / Aug 04, 2010 4:05pm

    Brian M.

    529 posts

    Hmm good question about the version.I haven’t updated since I installed which was probably almost 2 years ago so you’re probably right I’m on an older version.  When I look at the ‘about me’ in the XAMPP control panel I get version 0.3 which seems a bit odd since that isn’t even shown as an old version option on SourceForge.

    I don’t really know about the SQL file - I don’t know of any way of using XAMPP to import MySQL (is there?)  Oh - now that I look I realize there’s a browser based xampp page you can get to that has a phpMyAdmin link? Mine doesn’t have that since I’ve screwed with httpd.conf (I assume that’s why).  Are you using phpMyAdmin to try to import?  If so try using the SQL compatibility mode (MySQL40 has worked for me at for different .sql files).  The other option is to do the export but not to a file - take that resulting sql and run it as a SQL query.

    The online docs for XAMPP show the location of the httpd.conf file:

    http://www.apachefriends.org/en/xampp-macosx.html#876

    I downloaded a new version and there’s an etc folder in there?  Maybe try downloading again?

  • #8 / Aug 04, 2010 6:15pm

    Saroshv

    87 posts

    Yeah, still no etc folder. I might try re-downloading /installing it.

    I did download/upload my EE files.

    I believe my only problem now is the database.

    Can anyone give me a step-by-step “how to” for the database?

    I have GoDaddy hosting and want to move my EE website to XAMPP.

  • #9 / Aug 04, 2010 6:16pm

    Saroshv

    87 posts

    Can anyone give me a step-by-step “how to” for the database?

    I have GoDaddy hosting and want to move my EE website to XAMPP.

    I downloaded/uploaded all the EE files, but the database.

  • #10 / Aug 04, 2010 7:43pm

    Leslie Doherty

    176 posts

    Hi Saroshv, you’re wanting to move your installation of EE to another server, correct?

    Here’s the how to for the entire process:

    http://expressionengine.com/wiki/Moving_servers_-_ExpressionEngine_site_to_the_new_host/

    To get your database out of GoDaddy, use their MySQL Admin docs:

    http://help.godaddy.com/article/1487

    Hopefully this helps!

  • #11 / Aug 05, 2010 3:04pm

    Saroshv

    87 posts

    Alright. I have started following the directions. I exported the database, and have it open in Notepad++.

    It says to locate

    2. Open export file in text editor which is able to handle large files and delete or comment out the line

    CREATE DATABASE `my_database` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    USE `my_database`;


    and delete it.

    Problem: I cannot locate these lines.

    Any ideas?
    Should I post my database here?

  • #12 / Aug 05, 2010 3:06pm

    Saroshv

    87 posts

    AHH I still cannot figure out how to import my database into XAMPP.

    Any ideas?

  • #13 / Aug 05, 2010 3:10pm

    Saroshv

    87 posts

    Ok, I CAN import it. But I come up with this error:


    Error
    SQL query:


    —Database: `garrettcom`

    —————————————————————————————

    —Table structure for table `exp_actions`

    CREATE TABLE `exp_actions` (

    `action_id` INT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
    `class` VARCHAR( 50 ) NOT NULL ,
    `method` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY (  `action_id` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =22;

    MySQL said:

    #1046 - No database selected

     

    I am still following the instructions (view my other post). But I hit a problem. Perhaps the two are related?

  • #14 / Aug 05, 2010 7:56pm

    Saroshv

    87 posts

    Anyone?

  • #15 / Aug 05, 2010 7:56pm

    Saroshv

    87 posts

    I changed my database password. How can I change it on EE so it connects?

    Thanks

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases