• Resolved lecky2000

    (@lecky2000)


    I’m receiving the common error “Error Establishing a Database Connection” on my local install of WordPress but i don’t have a database, i never set one and WordPress still used to work.

    I stopped being able to access all WP panels when attempting to set up a coming soon page and changed some PHP settings (i can’t remember which, i was following an online guide)

    I’m using:-
    Win7, WordPress 4.4.1, WAMP and filezilla.

    I hhave read several of these forum post and other advice and tried changing the wp-config file in ../WAMP/mysite/wp-config.php to remove all user details and returned tto what i think was the defaults.

    Please can someone help, i just want to be able to ccess wordress so i can get this site of the floor and have spent 27 hours straight on this issue now, i’m going insane!!!!!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter lecky2000

    (@lecky2000)

    Current output of the wp-config.php file that people online suggest ensuring has the correct db details: –

    define(‘DB_NAME’, ”);
    define(‘DB_USER’, ”);
    define(‘DB_PASSWORD’, ”);
    define(‘DB_HOST’, ‘localhost’);
    define(‘DB_CHARSET’, ‘utf8’);

    The bit that’s getting me is I don’t know any SQL and have never specified an SQL database, or have user credentials.

    Any help is greatly appreciated, thanks!

    Without database wordpress cannot work. The wp-config file should have following details

    define(‘DB_NAME’, ‘your-database-name’);
    define(‘DB_USER’, ‘your-database-user-name’);
    define(‘DB_PASSWORD’, ‘your-database-password’);
    define(‘DB_HOST’, ‘localhost’);

    Thread Starter lecky2000

    (@lecky2000)

    hey, thanks for your reply yogex22.

    I’ve opted for a complete reinstall of everything to see where i went wrong. Not what i wanted considering all the time i’ve put into it so far but i’m hoping the process itself might highlight the steps i missed/got wrong.

    just in case, so far ive reinstalled WAMP and i’m in the middle of creating a wordpress core db, then the db of the site i want to create.

    One thing you might be able to help with, would it not be a good idea to add a custom user name and password to all SQL DB’s and use that instead of the default or would this caue further issues and/or changes when coming to uplaod from localhost to live host?

    thanks again ??

    It is good idea to have custom user name and password instead of default ones. But make sure you remember them.

    There will be no issue while making site live. Live hosting servers always need to have custom username and passwords only.

    Custom usernames and passwords are good for security also.

    Thread Starter lecky2000

    (@lecky2000)

    Thanks, thats good to know.

    Also, should i be renaming the my differ project/website folders under the “../wamp/www/” folder to exactly reflect my SL DB names? on checking them they don’t appear to match since i renamed the extracted wordpress install zip, it just says wordpress?

    Thanks ??

    No, The database name and the directory name need not to be the same. It can vary. There will be no issue.

    Thread Starter lecky2000

    (@lecky2000)

    Cool, i think i’m getting it conceptually…..

    ….so as long as the php code in the wp-config.php file (on the root of the host site) is pointing to user credentials that exist in the correlating SQL DB config, then it’s happy days?

    In that case, am I right in thinking i can use WAMPs sqlbuddy to set me up as a master user so the user details auto replicate to any new DB i create? (My intention being to create sites for several clients, then uploaded them to their respective web server.)

    Cheers

    Ok you can be the master user, but make sure you are using separate databases for every websites. The database names will vary as per different websites. The database user can be the same for all websites

    Thread Starter lecky2000

    (@lecky2000)

    Thanks a bunch yogex22, that’s helped clear things up for me loads.

    Anytime. You can contact me for any help related to wordpress.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Database Connection Error – what database, i never made one?’ is closed to new replies.