ERROR 1045 (28000) access denied for user 'root' @ 'localhost' (using password: NO)

Hi everybody

Newbie question…

I install Openfire on a Asterisk server (trixbox dist. CentOS 5). I create manually (phpMyAdmin) on a MySQL server (5.0.22)

When I try this :

cat openfire_mysql.sql | mysql [openfire];

I got this message : ERROR 1045 (28000) access denied for user ‘root’ @ ‘localhost’ (using password: NO)

Maybe is password protected by the trixbox ISO…

I’m not a Linux expert (far of this) maybe sommeone can help me

Thank’s

Nick

Hey Nick,

Two things:

  1. Make sure root@localhost (taken from your error message) has an account and password in MySQL. You should be able to set that up with phpMyAdmin if you haven’t already. To test, type “mysql -p” at the prompt. Enter the password when prompted. If it lets you in, proceed to step 2. If not, you need to get your account figured out and make sure you gave root access to the database (with a password).

  2. MySQL assumes no password is needed unless you specifically tell it you want to enter a password (silly, I know). Try this instead:

cat openfire_mysql.sql | mysql openfire -p

The -p switch will tell MySQL you want to be able to specify a password and you will then be prompted to enter the password for root@localhost. Also, I assumed you called your database “openfire” per your example - you don’t need the surrounding [ ] nor the trailing semicolon.

Hope this helps,

Justin

Thank’s for your help Justin

with your help, the tables are now created in MySQL database but i’m not able to connect to. I joint the error.log file, if you have time for un diag…

I use the the wizard (http://192.200.200.65:9090/setup/setup-datasource-standard.jsp) for connexion.

Thank you very much

Nick

Sorry Nick, nothing is jumping out at me from your logs. I’m still very new to Openfire myself so I’m probably not the one to assist at this point. Glad you got the tables populated, though.

Good luck,

Justin

I’m not sure, but it seems you have again these brackets arround “localhost”.

It’s an URL and in your case this should look like this:

jdbc:mysql://localhost:3306/openfire

Edit: Brackets are an common way to say that something needs to be replaced by the user.

Message was edited by: Coolcat

2 Likes

YES !!!

Thank you very much Coolcat and Justin

Everything seem to be fine.

Next step : Asterisk Plugin

I let you know

Nick

thanks got the same error and now it’s already resolved