Can't select database error in WordPress localhost on WAMP Server












0














I’m following this Lynda.com tutorial (WordPress – Building Themes from Scratch Using Underscores (2017)) and haven’t gotten very far. I’ve installed a blank WordPress install on localhost using WAMP Server and I downloaded and installed the underscores theme. But for some reason when I am trying to launch the website I am getting this error:




Can’t select database



We were able to connect to the database server (which means your username and password is okay) but not able to select the lynda_under17_040518 database.



Are you sure it exists?



Does the user root have permission to use the lynda_under17_040518 database?
On some systems the name of your database is prefixed with your username, so it would be like username_lynda_under17_040518. Could that be the problem?



If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.




Here is what i know




  • The database exists and I can run SQL commands on it in phpMyAdmin.

  • My user is root

  • Host is localhost

  • Database is lynda_under17_040518

  • root has all privileges to database (as verified in phpMyAdmin)

  • Other local websites on the same WAMPServer work just fine


This Stack Overflow post says to put define( 'WP_DEBUG_LOG', true ); in wp-config.php which I’ve done. It also says:




“the debug.log file will be in wp-content.”




I don't see any debug log even though I’ve restarted all services in WAMP and refreshed the browser.



Other Links I Consulted



I reviewed the info on these pages, but they didn't really help for my situation.




  • can't select database wordpress error

  • Can't select database - Wordpress

  • https://acloud.guru/forums/aws-certified-solutions-architect-associate/discussion/-KP4_87InltfL9P6rf-J/cant-select-database-wordpress-error

  • https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/

  • https://serverfault.com/questions/263868/how-to-know-all-the-users-that-can-access-a-database-mysql/263936


Where is my debug log and how can i get my local website running?










share|improve this question


















  • 1




    Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
    – Michael W.
    Nov 21 at 0:53










  • @MichaelW. Let me try it and I'll report back.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:26










  • @MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:41










  • Glad I could help! Answer posted.
    – Michael W.
    Nov 26 at 3:12
















0














I’m following this Lynda.com tutorial (WordPress – Building Themes from Scratch Using Underscores (2017)) and haven’t gotten very far. I’ve installed a blank WordPress install on localhost using WAMP Server and I downloaded and installed the underscores theme. But for some reason when I am trying to launch the website I am getting this error:




Can’t select database



We were able to connect to the database server (which means your username and password is okay) but not able to select the lynda_under17_040518 database.



Are you sure it exists?



Does the user root have permission to use the lynda_under17_040518 database?
On some systems the name of your database is prefixed with your username, so it would be like username_lynda_under17_040518. Could that be the problem?



If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.




Here is what i know




  • The database exists and I can run SQL commands on it in phpMyAdmin.

  • My user is root

  • Host is localhost

  • Database is lynda_under17_040518

  • root has all privileges to database (as verified in phpMyAdmin)

  • Other local websites on the same WAMPServer work just fine


This Stack Overflow post says to put define( 'WP_DEBUG_LOG', true ); in wp-config.php which I’ve done. It also says:




“the debug.log file will be in wp-content.”




I don't see any debug log even though I’ve restarted all services in WAMP and refreshed the browser.



Other Links I Consulted



I reviewed the info on these pages, but they didn't really help for my situation.




  • can't select database wordpress error

  • Can't select database - Wordpress

  • https://acloud.guru/forums/aws-certified-solutions-architect-associate/discussion/-KP4_87InltfL9P6rf-J/cant-select-database-wordpress-error

  • https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/

  • https://serverfault.com/questions/263868/how-to-know-all-the-users-that-can-access-a-database-mysql/263936


Where is my debug log and how can i get my local website running?










share|improve this question


















  • 1




    Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
    – Michael W.
    Nov 21 at 0:53










  • @MichaelW. Let me try it and I'll report back.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:26










  • @MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:41










  • Glad I could help! Answer posted.
    – Michael W.
    Nov 26 at 3:12














0












0








0


1





I’m following this Lynda.com tutorial (WordPress – Building Themes from Scratch Using Underscores (2017)) and haven’t gotten very far. I’ve installed a blank WordPress install on localhost using WAMP Server and I downloaded and installed the underscores theme. But for some reason when I am trying to launch the website I am getting this error:




Can’t select database



We were able to connect to the database server (which means your username and password is okay) but not able to select the lynda_under17_040518 database.



Are you sure it exists?



Does the user root have permission to use the lynda_under17_040518 database?
On some systems the name of your database is prefixed with your username, so it would be like username_lynda_under17_040518. Could that be the problem?



If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.




Here is what i know




  • The database exists and I can run SQL commands on it in phpMyAdmin.

  • My user is root

  • Host is localhost

  • Database is lynda_under17_040518

  • root has all privileges to database (as verified in phpMyAdmin)

  • Other local websites on the same WAMPServer work just fine


This Stack Overflow post says to put define( 'WP_DEBUG_LOG', true ); in wp-config.php which I’ve done. It also says:




“the debug.log file will be in wp-content.”




I don't see any debug log even though I’ve restarted all services in WAMP and refreshed the browser.



Other Links I Consulted



I reviewed the info on these pages, but they didn't really help for my situation.




  • can't select database wordpress error

  • Can't select database - Wordpress

  • https://acloud.guru/forums/aws-certified-solutions-architect-associate/discussion/-KP4_87InltfL9P6rf-J/cant-select-database-wordpress-error

  • https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/

  • https://serverfault.com/questions/263868/how-to-know-all-the-users-that-can-access-a-database-mysql/263936


Where is my debug log and how can i get my local website running?










share|improve this question













I’m following this Lynda.com tutorial (WordPress – Building Themes from Scratch Using Underscores (2017)) and haven’t gotten very far. I’ve installed a blank WordPress install on localhost using WAMP Server and I downloaded and installed the underscores theme. But for some reason when I am trying to launch the website I am getting this error:




Can’t select database



We were able to connect to the database server (which means your username and password is okay) but not able to select the lynda_under17_040518 database.



Are you sure it exists?



Does the user root have permission to use the lynda_under17_040518 database?
On some systems the name of your database is prefixed with your username, so it would be like username_lynda_under17_040518. Could that be the problem?



If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.




Here is what i know




  • The database exists and I can run SQL commands on it in phpMyAdmin.

  • My user is root

  • Host is localhost

  • Database is lynda_under17_040518

  • root has all privileges to database (as verified in phpMyAdmin)

  • Other local websites on the same WAMPServer work just fine


This Stack Overflow post says to put define( 'WP_DEBUG_LOG', true ); in wp-config.php which I’ve done. It also says:




“the debug.log file will be in wp-content.”




I don't see any debug log even though I’ve restarted all services in WAMP and refreshed the browser.



Other Links I Consulted



I reviewed the info on these pages, but they didn't really help for my situation.




  • can't select database wordpress error

  • Can't select database - Wordpress

  • https://acloud.guru/forums/aws-certified-solutions-architect-associate/discussion/-KP4_87InltfL9P6rf-J/cant-select-database-wordpress-error

  • https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/

  • https://serverfault.com/questions/263868/how-to-know-all-the-users-that-can-access-a-database-mysql/263936


Where is my debug log and how can i get my local website running?







mysql wordpress debugging localhost wampserver






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 22:21









Eric Hepperle - CodeSlayer2010

1,31162135




1,31162135








  • 1




    Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
    – Michael W.
    Nov 21 at 0:53










  • @MichaelW. Let me try it and I'll report back.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:26










  • @MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:41










  • Glad I could help! Answer posted.
    – Michael W.
    Nov 26 at 3:12














  • 1




    Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
    – Michael W.
    Nov 21 at 0:53










  • @MichaelW. Let me try it and I'll report back.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:26










  • @MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
    – Eric Hepperle - CodeSlayer2010
    Nov 24 at 11:41










  • Glad I could help! Answer posted.
    – Michael W.
    Nov 26 at 3:12








1




1




Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
– Michael W.
Nov 21 at 0:53




Some apps have difficulty with database names over 16 characters (yours is). If you shorten the database name, do you still get the same error?
– Michael W.
Nov 21 at 0:53












@MichaelW. Let me try it and I'll report back.
– Eric Hepperle - CodeSlayer2010
Nov 24 at 11:26




@MichaelW. Let me try it and I'll report back.
– Eric Hepperle - CodeSlayer2010
Nov 24 at 11:26












@MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
– Eric Hepperle - CodeSlayer2010
Nov 24 at 11:41




@MichaelW. It worked! I shortened renamed the db to "hume" and updated wp-config and after restarted my server I could finally see my database! If you put your comment as an answer I will accept it as the the solution.
– Eric Hepperle - CodeSlayer2010
Nov 24 at 11:41












Glad I could help! Answer posted.
– Michael W.
Nov 26 at 3:12




Glad I could help! Answer posted.
– Michael W.
Nov 26 at 3:12












1 Answer
1






active

oldest

votes


















1














Even though SQL and its ilk will allow database names that are very long, a lot of applications (such as cPanel) will only recognize database names that are 16 characters or less. I suspect that your database name (lynda_under17_040518) is simply too long for WAMP and/or WordPress to recognize and will work correctly if the database name is shortened.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402470%2fcant-select-database-error-in-wordpress-localhost-on-wamp-server%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Even though SQL and its ilk will allow database names that are very long, a lot of applications (such as cPanel) will only recognize database names that are 16 characters or less. I suspect that your database name (lynda_under17_040518) is simply too long for WAMP and/or WordPress to recognize and will work correctly if the database name is shortened.






    share|improve this answer




























      1














      Even though SQL and its ilk will allow database names that are very long, a lot of applications (such as cPanel) will only recognize database names that are 16 characters or less. I suspect that your database name (lynda_under17_040518) is simply too long for WAMP and/or WordPress to recognize and will work correctly if the database name is shortened.






      share|improve this answer


























        1












        1








        1






        Even though SQL and its ilk will allow database names that are very long, a lot of applications (such as cPanel) will only recognize database names that are 16 characters or less. I suspect that your database name (lynda_under17_040518) is simply too long for WAMP and/or WordPress to recognize and will work correctly if the database name is shortened.






        share|improve this answer














        Even though SQL and its ilk will allow database names that are very long, a lot of applications (such as cPanel) will only recognize database names that are 16 characters or less. I suspect that your database name (lynda_under17_040518) is simply too long for WAMP and/or WordPress to recognize and will work correctly if the database name is shortened.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 26 at 18:56

























        answered Nov 26 at 3:12









        Michael W.

        208314




        208314






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402470%2fcant-select-database-error-in-wordpress-localhost-on-wamp-server%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            To store a contact into the json file from server.js file using a class in NodeJS

            Redirect URL with Chrome Remote Debugging Android Devices

            Dieringhausen