Mysql password error

Hi

I tried to change the mysql database passwords,
and now I cannot get into the FreePBX GUI, See below:

Any help is appreciated

thank you
Walt


FATAL ERROR
DB Error: connect failed
Trace Back
Array
(
[0] => Array
(
[file] => /var/www/html/admin/common/db_connect.php
[line] => 69
[function] => die_freepbx
[args] => Array
(
[0] => DB Error: connect failed
)

    )

[1] => Array
    (
        [file] => /var/www/html/admin/header.php
        [line] => 131
        [args] => Array
            (
                [0] => /var/www/html/admin/common/db_connect.php
            )

        [function] => require_once
    )

[2] => Array
    (
        [file] => /var/www/html/admin/config.php
        [line] => 54
        [args] => Array
            (
                [0] => /var/www/html/admin/header.php
            )

        [function] => include
    )

)

That lordgabb, is NOT the way to change the MySQL password for FreePBX but for changing the root password for MySQL.

Do NOT follow the above or you will be in a lot more trouble that before.

You can follow this link: http://tinyurl.com/29sb6tc and the very first hit is this post: http://www.freepbx.org/support/documentation/faq/changing-the-mysql-password

maybe that will make it easier next time.

I ended up just doing a wipe/reinstall. I made a complicated password with special characters my password for everything from mysql, asterisk, … When I used a simpler password with no special characters, the problem was solved. It was a long path to a simple solution.

Russ

Hi

FYI - I did not forget my passcode - I simply wanted to secure it by changing what ever default passcodes it had.

It would be nice if someone can give CONCISE, CLEAR, STEP by STEP INSTRUCTIONS as to how to change any passcode (MYsql and other modules) in FreePBX. Instructions that do NOT bomb the system.

When I attempted to follow someone’s directions (from the forum), the whole system bombed out and I was unable to interface with the freepbx gui. I had to start all over again from scratch.

This should be a very simply, routine procedure to SECURE ones’ system.
(something built into the GUI)

Thank you
Walt

I’m sorry - but no one helped me on this forum.

I had to simply scratch the system and re-install it all over again

I was trying to change the passcode for Mysql, following someone’s instructions on the forums, and it did not work.

Such an easy request - made so difficult

Apparantly - the passcode is hardcode in many places, and is a pig to figure out.

Sorry - I Couldn’t help you
Walt

I have been reading a bit. Changing the password seems to be a week long process. :slight_smile:

I think my problem was using a password with special characters. Thoughts? Do you know what ended up being your root problem?

Like I said

I research someones instructions on the forum to change the MySql Passcode
and it turned out to be a night mare!

I am puzzled why - there is not a simple GUI interface to change the mysql passcode.

Thank you
Walt

If you change the password for MySQL you need to update /etc/amportal.conf and /etc/asterisk/cdr_mysql.conf and change the password in these two files.

Hi

Maybe you can shed some light and provide some instructions
on changing the mysql passcode, and for any passcode for that matter.

Thank you
Walt

First things first. Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.

mysqld_safe --skip-grant-tables

You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.

mysql --user=root mysql

update user set Password=PASSWORD(‘new-password’) where user=‘root’;
flush privileges;
exit;

Now kill your running mysqld, then restart it normally. You should be good to go. Try not to forget your password again.

Hope can help.

Walt,

Have you been able to solve this problem?

I just installed a fresh system with the following components:

freepbx-2.8.0
asterisk-addons-1.6.2.2
freepbx-2.8.0
asterisk-1.6.2.13
libpri-1.4.11.4
dahdi-linux-complete-2.4.0+2.4.0

Configured mysql as follows:


mysql

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO [email protected]bx IDENTIFIED BY ‘enter password’; (single quotes are part of command)

GRANT ALL PRIVILEGES ON asterisk.* TO [email protected] IDENTIFIED BY ‘enter password’; (single quotes are part of command)

flush privileges;

\q

mysqladmin -u root password ‘enter password’ (single quotes are part of command)

reboot


when I reboot any try to launch freepbx by going to http://localhost/admin, I get the same page:


FATAL ERROR
DB Error: connect failed
Trace Back

Array
(
[0] => Array
(
[file] => /var/www/html/admin/common/db_connect.php
[line] => 69
[function] => die_freepbx
[args] => Array
(
[0] => DB Error: connect failed
)

    )

[1] => Array
    (
        [file] => /var/www/html/admin/header.php
        [line] => 131
        [args] => Array
            (
                [0] => /var/www/html/admin/common/db_connect.php
            )

        [function] => require_once
    )

[2] => Array
    (
        [file] => /var/www/html/admin/config.php
        [line] => 54
        [args] => Array
            (
                [0] => /var/www/html/admin/header.php
            )

        [function] => include
    )

)


any help would be appreciated!!!

Thanks
Russ