Running WordPress locally and database error

Running this on a MAC

Downloaded and installed MAMP

Extracted the WP files and moved them to:

users/myname/applications/MAMP/Scotty/ Scooty used to be the htdocs folder.

Used the link for myphpadmin to create a database – did not add users or change root password.

Renamed with wp-config-example file to wp-config and added the database name and user, left password blank: '', user is root

Restarted servers.

I can't get the install to run.

From http://localhost:8888/wp-admin/install.php I get error establishing database connection. Same thing from http://localhost:8888/

Help!
xmouserAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
What do your port setting look like in MAMP Preferences? I set my Apache port to 80 because I don't like typing localhost:8888 all the time.

Is this related to an upgrade to Yosemite? Mine got messed up when I did that but it turned out to be the port settings in MAMP.
Screen-Shot-2015-04-09-at-4.07.17-PM.png
Lucas BishopClick TrackerCommented:
left password blank

If you left the password blank, the installation script won't be able to access the db. Specify the password in wp-config.php and you should be able to connect as expected.
xmouserAuthor Commented:
TomBeck - no update new install.

LucasBishop - did that earlier, but will try again. When I had a password I wasn't even getting the 'error connect... screen, just could not find.
Screen-Shot-2015-04-09-at-16.38.45.png
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

xmouserAuthor Commented:
Set password to root, restarted servers and added root as the password in wp-config.php
xmouserAuthor Commented:
See attached screenshot:
Lucas BishopClick TrackerCommented:
Screenshot didn't come through, fyi.
xmouserAuthor Commented:
Lucas BishopClick TrackerCommented:
After all of those settings have been specified in wp-config.php, are you still receiving "error establishing database connection"? If not, what is the response you're receiving?
Tom BeckCommented:
Can you connect to MySql through terminal?

Type or paste:

cd /Applications/MAMP/Library/bin

Hit enter then:

./mysql --host=localhost -u root -proot

Hit enter

(might have to add the port number)
xmouserAuthor Commented:
Lucas Bishop - yes 'error establish... that's the latest response.

Tom Beck - see screenshot.
Screen-Shot-2015-04-09-at-17.56.29.png
Lucas BishopClick TrackerCommented:
1.) You mentioned editing "wp-config" ~ please make sure you do have the file extension .php on the end of the actual file.
2.) Instead of using 'localhost' try specifying ' ip:port '
define('DB_HOST', '127.0.0.1:8889');

Open in new window

Lucas BishopClick TrackerCommented:
One more thing that is surely an issue. In reviewing your screen shot, there is a combination of stylized and non-stylized quotes in your config file. You're likely using a text editor that is inserting these quotes.

If you look at the attachment you'll see that the values you've entered in are encased in stylized quotes:
bad-quotes.PNG
xmouserAuthor Commented:
Yeah using the default text editor for MAC. I'll check, thanks.
xmouserAuthor Commented:
Doing 127.0.0.1:8889 gets me this - see screenshot.
Screen-Shot-2015-04-13-at-15.19.06.png
xmouserAuthor Commented:
Disregard the above. With localhost:8888/scotty  I get - see attached. I blew out MAMP and started again. Using the MAC text editor.
Lucas BishopClick TrackerCommented:
In wp_config.php you are specifying the database name as 'Mike' but in the recent screenshot of your phpMyAdmin it appears the database name is Scotty

This could be the source of "error establishing database connection".
xmouserAuthor Commented:
Scotty, deleted everything and started over. See screenshot.
Screen-Shot-2015-04-13-at-16.37.06.png
Lucas BishopClick TrackerCommented:
There are still a variety of stylized quotes in the screenshot. Make sure to use non-stylized quotes throughout the config file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xmouserAuthor Commented:
I get what you mean but I'm using Notes on the MAC. What should I be using?
xmouserAuthor Commented:
Oh, found text edit.
Lucas BishopClick TrackerCommented:
xmouserAuthor Commented:
Hmm, still looks the same - screenshot.
Screen-Shot-2015-04-13-at-16.45.53.png
xmouserAuthor Commented:
Ok the text editor was in plain text - still wouldn't work, made it rich text, then plane text. Now getting: Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.

So some progress.
xmouserAuthor Commented:
Got it Lucas - thanks. Created a new sample file, made it rich text then plain text, changed the extension to .php since it automatically changed it and then I could run the install.

Thanks again.
xmouserAuthor Commented:
Great job!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.