Never ending `Error establishing a database connection`

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Never ending `Error establishing a database connection`

Postby nutzer » 03. January 2016 08:40

Hello everyone

I followed the instructions given at: http://www.kajabity.com/2012/10/error-establishing-a-database-connection-with-xamp-mysql-and-wordpress/
but keep getting the error message in the subject field. I have made sure that I have entered the correct DB name, DB username and DB password in the correct syntax.

My suspicion is now pointing to the difference between XAMPP for Mac OS X and Windows?
Is there a unique feature in XAMPP for Mac OS X that introduces different operations for setting up a database?

I've been trying to work this out since Xmas. Please someone give me a helping hand.

Thanks for reading.
nutzer
 
Posts: 3
Joined: 29. December 2015 07:17
Operating System: Mac OS X, Windows 10

Re: Never ending `Error establishing a database connection`

Postby Nobbie » 03. January 2016 09:30

nutzer wrote:My suspicion is now pointing to the difference between XAMPP for Mac OS X and Windows?
Is there a unique feature in XAMPP for Mac OS X that introduces different operations for setting up a database?


No.

Please tell us the credentials you applied in WordPress and show us screenshots of PhpMyAdmin, which shows Users and Databases.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Never ending `Error establishing a database connection`

Postby nutzer » 03. January 2016 11:07

Nobbie wrote:No.

Please tell us the credentials you applied in WordPress and show us screenshots of PhpMyAdmin, which shows Users and Databases.



Thanks for the reply. Changing the DB username to root has got me through to the next step which returns Object not found! error.

The credentials in wp-config.php are as follows:

define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'unicode_general_ci');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', 'unicode_general_ci');


Beforehand, the wp showed numerous WordPress database error: [Table 'wordpress.wp_posts' doesn't exist]not found message.
The way I created the database named wordpress was:
1. I clicked phpmyadmin in the top XAMPP page
2. I created a database named wordpress in the MyPHPAdmin menu
3. I assigned the password to the root account.
4. I returned to http://localhost:8080/xyz.com/wp-admin and entered initial settings for the wp site.
5. I saw numerous not found message as shown above.
6. WP returned Object not found! error.

More help would be appreciated.
Last edited by nutzer on 03. January 2016 11:34, edited 1 time in total.
nutzer
 
Posts: 3
Joined: 29. December 2015 07:17
Operating System: Mac OS X, Windows 10

Re: Never ending `Error establishing a database connection`

Postby Nobbie » 03. January 2016 11:23

nutzer wrote:Thanks for the reply. Changing the DB username to root has got me through to the next step which returns Object not found! error.


Please provide full original error message.

nutzer wrote:4. I returned to http://localhost:8080/teatime-japan.com/wp-admin and entered initial settings for the wp site.


This is definately wrong, I am not an wordpress expert, but i read the installation documentation (did you also??) and i also installled it successfully. There is NO advice to proceed to the wp-admin folder (why are you doing this?), you MUST start wordpress from the installation folder (which is above the wp-admin folder). You should ask in a wordpress forum for more support.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 11 guests