R
R
Ruslan2014-08-30 09:35:08
Slider
Ruslan, 2014-08-30 09:35:08

Openfire + mysql = Access denied for user 'root'@'localhost' (using password: YES) ?

Good afternoon.
Who faced a similar error?
In error.log

Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

In info.log
2014.08.30 15:47:53 org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 10 out of 10).
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

I've been fighting for a week now - the scarlet flower does not come out in any way. Root has rights to everything, during the initial server setup - login / pass passes, but after the first restart of the service it falls into this error. Where to dig?
Connection settings:
<connectionProvider>
    <className>org.jivesoftware.database.DefaultConnectionProvider</className>
  </connectionProvider>
  <database>
    <defaultProvider>
      <driver>com.mysql.jdbc.Driver</driver>
      <serverURL>jdbc:mysql://localhost:3306/openfire?useUnicode=true&amp;amp;characterEncoding=UTF-8&amp;amp;characterSetResults=UTF-8</serverURL>
      <username encrypted="true">jMz15UTd+30DVc5uZfXg5g==</username>
      <password encrypted="true">F1AhkeXip3grekfeyX6LOg==</password>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
yosemity, 2017-06-19
@yosemity

Maybe someone will help, tk. the problem is relevant on debian 8, openfire 4.1.4
The problem is almost 1v1, but I did not set it up under the root, but registered a separate user. For that, I got a strange error:
Everything else is the same.
Solution: None. This is either a bug or me xs. Some mysticism helped me. Specified in openfire.xml directives <username> and <password> in their pure form (without spaces, hereinafter, the toaster parser cuts), commenting out the original lines. With the subsequent replacement of < setup > with false, the openfire itself changed the pure credentials to a hash, but different from the commented ones. It began to be allowed into the base after the restart. Then I remembered that this next time I didn’t break the base in UTF8, dropped it, recreated it. Put in < setup >false< /setup > again. As a result, after installation, openfire returned the hashes to the first ones (the commented ones remained in place, there was something to compare with). And then everything works.
The only guess is that openfire somehow crookedly makes / parses openfire.xml and manual editing helped me. Despite the fact that in a similar scheme on deb7, with the only difference being that it works with AD, everything fell right at once. Any other ideas?

A
allexnew, 2020-09-25
@allexnew

After the next update, I also encountered this error. Didn't accept MySQL database password.
It helped to write the login and password in its pure form (by changing the encryption to false):

<username encrypted="false">username</username>  
<password encrypted="false">UserPassword</password>

Started right up with a pinch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question