To reset the password for the database user that confluence's uses to connect to the database, follow the guide below.

If your confluence instance connects directly via JDBC, then your password will be in your <CONFLUENCE_HOME>/confluence.cfg.xml file.
E.g.

    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.password">confluencepass</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost/confluence?autoReconnect=true</property>
    <property name="hibernate.connection.username">confluencedbuser</property>
    <property name="hibernate.database.lower_non_ascii_supported">true</property>
    <property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property>

Change the "hibernate.connection.password" property to the correct value (in the above the example replace "confluencepass" with the new password).

If you're connecting via datasource then you will see in the confluence.cfg.xml file something like:

<property name="hibernate.setup">true</property>
<property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.datasource">java:comp/env/jdbc/confluence]</property>

I.e. the property "hibernate.connection.datasource" is defined. If so your password is defined within your datasource. Each application server stores its information differently, but if you are using tomcat, then check your server.xml file.