• Resolved amanda1973

    (@amanda1973)


    I’ve installed xampp and wordpress locally. Everything goes well until I try to view a copy of the index page. It looks like xampp (or wordpress, or something) can’t find my database, because there’s no information displayed.

    Specifically, if I try to view the index page within one of the themes (e.g., ../wp-content/themes/classic/index.php), the page displays somethng that looks like this:

    ‘,”); ?>
    a€?? @

    Where should I save a local copy of the database so that wordpress can retrieve the information?

    Thanks much!

Viewing 12 replies - 1 through 12 (of 12 total)
  • In browser addy bar, type https://localhost/phpmyadmin/ – this will open the program so you can set up a database. For convenience, I always name my local dbs the same as they’re named on my online servers.

    Create a database in phpmyadmin. Don’t worry about the tables that aren’t there. Now go to SQL tab in phpmyadmin; in the “location of text file” area, browse to the dump of your online db, and let phpmyadmin install the local copy for you.

    Thread Starter amanda1973

    (@amanda1973)

    Thanks, vkaryl.

    When you say “browse to the dump of your online db,” do you mean the local copy (blog.sql)?

    There are a couple of guides on the right here which might help ?
    https://www.tamba2.org.uk/wordpress/

    Thread Starter amanda1973

    (@amanda1973)

    Podz, your guide is the one that got me as far as I did. ??

    Thread Starter amanda1973

    (@amanda1973)

    Hmm. Just tried vkaryl’s suggestion and got the following error message:

    Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampplite\phpMyAdmin\libraries\read_dump.lib.php on line 91

    What now?

    You are trying to import the file into xampp ?

    Could of choices:
    – open it in Notepad and paste complete chunks into the SQL tab
    – open the php.ini file and set the exec time to longer

    Thread Starter amanda1973

    (@amanda1973)

    For choice 1, do I paste the chunks into the “Run SQL query/queries on database” tab?

    (And do I do it all at once, or in batches?)

    Yes you do.
    So long as you paste complete statements, all is good.

    A statement will start with
    INSERT INTO blahblahblah;
    and will then repeat (and repeat …..) so just cut/paste.

    1000-1500 statements at a time is fine from experience

    OR

    Cut and paste each table into a seperate doc, and load them.

    One day, this bit will be made easier ??

    Thread Starter amanda1973

    (@amanda1973)

    Thanks for your help, Podz.

    I’m not sure I understand, but I’m going to try it anyway.

    Thread Starter amanda1973

    (@amanda1973)

    When I cut and paste the statements, it tells me that the table isn’t found. Do I need to manually create the tables?

    You said cut/paste each table into a separate doc. To clarify, does this mean i should…

    1) Copy all “insert into blacklist” statements into a separate document

    2) Save document as “blacklist.sql”

    3) Point to the location of “blacklist.sql” in the “Location of the text file” field in the mysql tab.

    Sorry to be so obtuse. I don’t understand this stuff very well. Thanks again for your help.

    Create tables ? Yes.

    There are two parts to each table.
    First is the creation:
    DROP TABLE IF EXISTS wp_categories;
    CREATE TABLE
    wp_categories (
    cat_ID bigint(20) NOT NULL auto_increment,
    cat_name varchar(55) NOT NULL default '',
    category_nicename varchar(200) NOT NULL default '',
    category_description longtext NOT NULL,
    category_parent int(4) NOT NULL default '0',
    PRIMARY KEY (
    cat_ID),
    UNIQUE KEY
    cat_name (cat_name),
    KEY
    category_nicename (category_nicename)
    ) TYPE=MyISAM AUTO_INCREMENT=6 ;

    Pasting that tells the db what to make and how to make it.
    In the sql dump straight after that, will be the categories:
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (1, 'General', 'general', '', 0);
    INSERT INTO
    wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (2, 'Work', 'work', '', 0);
    INSERT INTO
    wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (3, 'Thinking', 'thinking', '', 0);
    INSERT INTO
    wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (5, 'Good Stuff', 'good-stuff', '', 0);
    It’s generally a small table, so it’s no problem.

    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (5, 'Good Stuff', 'good-stuff', '', 0);
    Is a complete statement. It tells the db where and how to use the data.
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename,
    is a broken statement and would create an error.

    ————————

    You can certainly copy/paste/save each section as I have outlined above.
    So long as each section starts with the INSERT INTO and finishes correctly (usually with the ; character) then it doesn’t even have to be complete and diferent sections.

    You very probably do not need to import ANY spam lists, blacklists, stats or such – though if you don’t, forget the plugins too.

    Thread Starter amanda1973

    (@amanda1973)

    Woo hoo!

    Thanks so much, podz. Big kiss.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Xampp — How to point it to database?’ is closed to new replies.