[DB Error: extension not found] ** mysql://asteriskuser:[email protected]/asterisk

I have been using asterisk successfully for several months now. A few days ago, I tried to connect to the freepbx webpage on my trixbox and I get:

[DB Error: extension not found] ** mysql://asteriskuser:[email protected]/asterisk

I have tried googling for some help on this problem but to no avail.

My trixbox continues to work fine, it is just that I cannot configure it.

Please help!

Thanks.

Looks like you don’t have the php-mysql package installed (or php4-mysql or php5-mysql, depending on your OS/PHP version) or enabled. Make sure that is enabled by looking in your php.ini file for “extension=mysql.so”. If you have separate php.ini files for apache and CLI, make sure it is enabled for both.


Greg MacLellan - Core FreePBX Developer
http//freepbx.org - irc.freenode.net #freepbx

I have php-mysql (5.1.6-3.el4s1.7) installed on my system.

Although the line “extension=mysql.so” is not in php.ini, it is in /etc/php.d/mysql.ini. I can see that apache is trying to load but returns with an error:

Here is the tail of my apache error log:

PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/modules/mysql.so’ - /usr/lib/php/modules/mysql.so: undefined symbol: OnUpdateLong in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/modules/mysqli.so’ - /usr/lib/php/modules/mysqli.so: undefined symbol: spl_ce_RuntimeException in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/modules/pdo.so’ - /usr/lib/php/modules/pdo.so: undefined symbol: zend_ce_traversable in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/modules/pdo_mysql.so’ - /usr/lib/php/modules/pdo_mysql.so: undefined symbol: zend_throw_exception_ex in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library ‘/usr/lib/php/modules/pdo_sqlite.so’ - /usr/lib/php/modules/pdo_sqlite.so: undefined symbol: zend_throw_exception_ex in Unknown on line 0
[Sun Sep 23 21:05:45 2007] [notice] Apache/2.0.52 (CentOS) configured – resuming normal operations

The file mysql.so is in /usr/lib/php/modules/ (as they all are). Other modules such as gd.so and imap.so do get loaded ok . I checked the permissions and they look fine (755).

I have this problem the question is the user the asteric and freepbx make on conflict in the mysql whe yo restart the server the mysql is down Here there any solution please if no work POST THE CORRECT SOLUTION

FROM
http://www.sureteq.com/blog/?cat=6

Some CDR troubleshooting and default mysql root password

Hey everyone…I wanted to just give out a quick tutorial on CDR troubleshooting. I had a client who recently changed the user=asteriskuser in the /etc/asterisk/cdr_mysql.conf file to the root user instead of asteriskuser. After doing a bit of troubleshooting, I ended up changing the mysql root password to match the password set in that file. So, here is how to change the mysql root password and use it for CDR (even though asteriskuser is used by default).

From the Linux CLI, go to /etc/asterisk and nano the cdr_mysql.conf file:

cd /etc/asterisk
nano cdr_mysql.conf

Find the line that says ‘password=amp109′ and change the amp109 to your desired password. Also note what user is used. By default, this file uses ‘asteriskuser.’ This is perfectly acceptable…you would want to change the password= line to your asteriskuser password. If, however, you want to use ‘root’ instead, change the line to user=root, and change the password to your mysql root password (or what we are about to change your mysql root password to).

CTRL+X to exit nano and then Y when asked if you want to save.

Now we have changed the CDR conf file, but we still need to change the password in mysql. Do the following:

mysqladmin -u root -p password new_password_here

It will now prompt you for a password…what it is prompting you for is the default root password which is ‘passw0rd’ (with a zero). If you enter it in and get no errors, you have successfully changed your mysql root password. Now let’s restart mysql and Asterisk.

service mysqld restart
amportal restart

To test CDR connectivity, let’s get into the Asterisk CLI:

asterisk -vvvr

Now, to see if CDR is working…type the following at the Asterisk CLI prompt:

cdr mysql status

You should see something like:

Connected to [email protected] using table cdr for 8 minutes, 32 seconds.
Wrote 0 records since last restart.

If you see ‘Not currently connected to a MySQL server.’ then you most likely still have a password mismatch…and if at first you don’t succeed, try try again!

just do the recovery of old file