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 trialJana Ramos
519 Points'Cant select database' error? Installing local wordpress
Message says...
We were able to connect to the database server (which means your username and password is okay) but not able to select the localwp database.
Are you sure it exists? Does the user wpuser have permission to use the localwp database? On some systems the name of your database is prefixed with your username, so it would be like username_localwp. Could that be the problem?
My fields are
Database Name localwp
Username wpuser
Password
Database Host localhost
Table Prefix wptest_
Thanks :)
3 Answers
Samuel Glister
12,471 PointsHi Jana,
So when setting up Wordpress you need to make sure 1. Your local host is up and running & 2. You have access to your phpmyAdmin.
Then:
- Go to phpmyAdmin and create a database in there (name it whatever you like - for example treehouse).
- Go to your browser i.e chrome and enter the url for the site directory which should be something like localhost/yourwebsite
- Then enter the details database name: treehouse (so it matches the database we created), username: usually root, password: usually root, Database host: localhost normal and then table prefix: I usually change this to something like 'tth_'.
Click submit then you should be able to progress :)
I hope this helps.
justdave
31,518 PointsHi Jana, what Samuel said above, also check your configsample file to make sure the info matches and no typos ;P
Jana Ramos
519 PointsGreat, fixed!! Many thanks for the advice.