Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Can't select database
There is no explanation in the video about how to create a wordpress database when using Xampp. I'm sure that is the reason for getting the following error when trying to install wordpress locally...
"We were able to connect to the database server (which means your username and password is okay) but not able to select the wp_portfolio database.
Are you sure it exists? Does the user root have permission to use the wp_portfolio database? On some systems the name of your database is prefixed with your username, so it would be like username_wp_portfolio. Could that be the problem?"
Any advice is very appreciated.
Darren HealyFront End Web Development Techdegree Student 23,565 Points
Then, when you think you are at the stage of creating a database. Run Xampp with administrator rights, start Apache and MySQL, then click on the MySQL admin button which will bring up the PHPmyadmin view. This is set up in the same way as it is in the Mamp videos.
This is definitely covered as I've just learned it myself last week and have reviewed the section several times to make sure I'm doing it right.
Hope I've helped!
Emeka Okoye2,489 Points
To install WP locally using Xampp, first create your database using PHPMyAdmin. You can call your database anything you like...
When you run the installation in the browser, enter the database name you created, for the username enter 'root', leave the password blank and accept the other defaults.
In the end your config.php should look like this:
/** The name of the database for WordPress */
define('DB_NAME', 'Database name here');
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
I hope I've answered your question, if not let me know.