• Resolved bobby_dingle

    (@bobby_dingle)


    Hi,

    Just got myself a new laptop, running xampp, downloaded fresh copy of wordpress.

    Running Apache & MySQL in xampp, went to navigate to wp-admin in my browser and it keeps asking me to enter details for an apparently existing database, which can’t exist because it’s the first time I’m using wordpress on this machine.

    Any ideas? It wouldn’t bother me if it wasn’t an issue, however, it won’t bring me to the default wordpress dashboard.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I installed XAMPP a few weeks ago, and I had existing databases to import. But either way, I believe you first need make a database name (an emply shell for a database) and then put that name in wp-config so WordPress can find it. And just in case your might not already know, your database username is “root” and there is no password, just “” in that spot and then a table_prefix farther down on that page.

    This is the normal and correct sequence of the installation process. As leejosepho mentions, you first have to use phpMyAdmin to create a new, empty database (no spaces in the name).

    Using the default values for XAMPP, the items to enter on the db screen are:

    DB Name – whatever you named it
    DB User – root <this is the default XAMPP DATABASE user name>
    DB Password – <empty, do not enter anything here> <this is the default XAMPP DATABASE user PWD>
    DB Host – localhost or 127.0.0.1
    Table Prefix – up to you

    Thread Starter bobby_dingle

    (@bobby_dingle)

    All done, thanks, pretty simple really, wordpress trying to find a database, no existing database, so create one?

    Ha. it’s working anyway thanks for the help

    Cool beans. If I had been able to recall all of Lyle’s details when I first posted, I would have also mentioned going to the XAMPP dashboard to find the MySQL Admin button to do that.

    wordpress trying to find a database, no existing database, so create one?

    Ha. it’s working anyway…

    The deal there is that the term “database” gets used in two different ways. In WordPress parlance, a database is a set of tables that happen to reside in a MySQL database at the server…and then for whatever reason, local installs of WordPress apparently need a server database to already exist so they can find the place to put the database.

    Thread Starter bobby_dingle

    (@bobby_dingle)

    Yeah it’s a weird thing, nothing can ever be simple!

    Would have made more sense if there was an FYI when downloading wordpress, I thought my new laptop was blocking the local connection at first

    .and then for whatever reason, local installs of WordPress apparently need a server database to already exist so they can find the place to put the database

    This works the same way on hosted sites as well πŸ™‚

    If you have a hosting account that supports more than one ‘database’, then to set up another WP site on that account, you have to first use the hosting account’s database tool (on a lot of hosting accounts, it’s the same phpMyAdmin which is in the popular cPanel <brand name> hosting control panel) to create the new, empty database into which the WP installer will populate the required tables; same scenario as any local install.

    This works the same way on hosted sites as well πŸ™‚

    …create the new, empty database into which the WP installer will populate the required tables; same scenario as any local install.

    So then, how is that done at/by/upon the *first* installation? I had triggered a cPanel script to install my first site a little over two years ago, and I think I have just now realized that *script* must have done that initial database setup and then the WordPress installer took over to add the tables, yes?

    Yes, the ‘one-click’ install script did all that for you, which is one of the reasons I avoid them: you don’t know what went on to get there πŸ™‚

    On any new hosting account I set up, I always do manual installs, including the initial one.

    Many thanks, Mr. Lyle. I do not remember the name of the installer I had used, but I do remember later having trouble getting my first site detached from its notices saying my installation needed an update even after I had figured out how to disable that script and I had already updated my site anyway. Overall, and like as you have mentioned, I think it best for more people to begin there at cPanel and do the WordPress installation manually so there will not be such a scramble to learn about all of that later on after a squall of some kind hits the site!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Starting from scratch – Error establishing a database connection’ is closed to new replies.