Wordpress database connection error

I am trying to install wordpress on my vps but even if i configured the wp_config file it says "database connection"

i think i am missing something in here;

define('DB_NAME', 'mydatabasename');

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

do i need to enter accountname in front of them?

for examle; user_mydatabasename

if yes how cause i tried it too but nothing changed. thanks.

fixed it. thread can be closed.

8 Replies

Threads are never closed until a fix is posted ;-)

Hehe ok =) What i did is actually corrected my mysql commands to create the db and user. I dont remember the old commands i used which didnt work for me but here is the commands that worked for me;

mysql -u root -p
mysql> grant all privileges on *.* to wp_user@localhost identified by "wp_pa55w0rd";
mysql> create database wp_dbase;
mysql> quit

That's it :oops: :D

Thanks!

I probably won't run into this problem myself, but this thread is now part of the Great Internet Mind. In a couple years, someone will have the exact problem you had, Duck it, find this thread, and then – bam -- fixed. I am here to represent the future.

To the future!

okay now another error occurs during the wordpress setup. it is passing the database setup with out a problem but after i want to finish setup it says;

WordPress database error: [Duplicate entry '0-0' for key 'PRIMARY']
INSERT INTO `wp_nok2term_relationships` (`term_taxonomy_id`,`object_id`) VALUES ('0','0')

any idea?

thanks.

Ok , i took screenshot for the error.

with a clean installation I've got the following errors during the installation:

~~![](<URL url=)http://img30.imageshack.us/img30/9113/75357809.png" />

And if I try to login with the given credentials it says:

![](" />~~

1) Delete the database and recreate it

2) Make sure the user for the database has all permissions to the database

3) Restart wordpress installation

Ahh yeahh now it worked! Thank you obs.

@hoopycat:

Thanks!

I probably won't run into this problem myself, but this thread is now part of the Great Internet Mind. In a couple years, someone will have the exact problem you had, Duck it, find this thread, and then – bam -- fixed. I am here to represent the future.

To the future!

Dear Randall:

At first, I thought this was merely a coincidence:

~~![](<URL url=)http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png" />

Then I looked at the mouse-over.

Thanks for reading the Linode Forums. -rt~~

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct