xmouser
asked on
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/Scott y/ 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!
Downloaded and installed MAMP
Extracted the WP files and moved them to:
users/myname/applications/
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!
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.
ASKER
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
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
ASKER
Set password to root, restarted servers and added root as the password in wp-config.php
ASKER
See attached screenshot:
Screenshot didn't come through, fyi.
ASKER
New screenshot.
Screen-Shot-2015-04-09-at-16.43.45.png
Screen-Shot-2015-04-09-at-16.43.45.png
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?
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)
Type or paste:
cd /Applications/MAMP/Library
Hit enter then:
./mysql --host=localhost -u root -proot
Hit enter
(might have to add the port number)
ASKER
Lucas Bishop - yes 'error establish... that's the latest response.
Tom Beck - see screenshot.
Screen-Shot-2015-04-09-at-17.56.29.png
Tom Beck - see screenshot.
Screen-Shot-2015-04-09-at-17.56.29.png
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 '
2.) Instead of using 'localhost' try specifying ' ip:port '
define('DB_HOST', '127.0.0.1:8889');
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:
If you look at the attachment you'll see that the values you've entered in are encased in stylized quotes:
ASKER
Yeah using the default text editor for MAC. I'll check, thanks.
ASKER
Doing 127.0.0.1:8889 gets me this - see screenshot.
Screen-Shot-2015-04-13-at-15.19.06.png
Screen-Shot-2015-04-13-at-15.19.06.png
ASKER
Disregard the above. With localhost:8888/scotty I get - see attached. I blew out MAMP and started again. Using the MAC text editor.
ASKER
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".
This could be the source of "error establishing database connection".
ASKER
Scotty, deleted everything and started over. See screenshot.
Screen-Shot-2015-04-13-at-16.37.06.png
Screen-Shot-2015-04-13-at-16.37.06.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I get what you mean but I'm using Notes on the MAC. What should I be using?
ASKER
Oh, found text edit.
I'm a big fan of http://www.barebones.com/products/textwrangler/
ASKER
Hmm, still looks the same - screenshot.
Screen-Shot-2015-04-13-at-16.45.53.png
Screen-Shot-2015-04-13-at-16.45.53.png
ASKER
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.
So some progress.
ASKER
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.
Thanks again.
ASKER
Great job!
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