Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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 */ define('DB_USER', 'root'); /** MySQL database password */ define('DB_PASSWORD', ''); /** MySQL hostname */ define('DB_HOST', 'localhost');
I hope I've answered your question, if not let me know.