• Resolved 5circles

    (@5circles)


    As others have said, I’m sure people are sick of this topic. I’m starting a new one because the most recent I’ve seen has solved the database connection, but is now on another issue.

    I’m trying to set up a local copy of WordPress on Ubuntu 8.04.

    I downloaded WordPress and set up the files per instructions. I have the wordpress directory in /var/www/worpress, with the ownership as www-data:www-data. Permissions look OK too.

    I set up the MySQL database per instructions, with database called wordpress-private and user wordpress.

    When I try to access the install.php file (either from the Ubuntu machine or across the LAN), I see the ‘Error establishing a database connection page’.

    I’m using phpMyAdmin to administer, and some results look odd to me.

    I can access as root, with the password I set up.
    The wordpress user can log on to phpMyAdmin, but only if I don’t enter a password. If I enter the password I get an error. (I tried commenting out the DB_PASSWORD line in wp-config.php, but it doesn’t make a difference.)

    So it looks like something with the user/password/privileges. The user has default global privileges – which are USAGE – and all access rights to the wordpress database.

    I just tried changing the username/password in wp-config.php to root. This worked. I guess I can limp along for now, but that doesn’t seem right.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • MichaelH

    (@michaelh)

    Thread Starter 5circles

    (@5circles)

    Of course, as soon as I post I try something else that (sort of) works.

    I tried changing the privileges for the wordpress user to Global – ALL. That didn’t work. Then I noticed that the host for the wordpress user was set to %. I thought that meant that I could access from anywhere, but apparently not. I changed the host to local, and then the install worked.

    I wish I understood this more, but at least I’m making progress.

    Thread Starter 5circles

    (@5circles)

    Might review the Step 2: Create the Database and a User section of Installing WordPress.

    I thought I did – went through it several times. I didn’t see anything that indicated I needed to change the host for a user. Maybe that’s part of the Ubuntu defaults.

    moshu

    (@moshu)

    Yes, all this thread has nothing to do with WordPress. It is about your struggle to set up your own server, not WP – so it should not even be here!

    Thread Starter 5circles

    (@5circles)

    Yes, all this thread has nothing to do with WordPress. It is about your struggle to set up your own server, not WP – so it should not even be here!

    With respect, I beg to differ slightly. Yes, it turned out that the problem was with the settings in MySql. But I followed the instructions in the WordPress install (or thought I did), and all that I could see was the error from WordPress.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error establishing database connection’ is closed to new replies.