AstBill is using MySQL Standard 5.0.13
You can find how to upgrade to 5.0 here.
The Standard binaries are recommended for most users, and includes the InnoDB storage engine.
http://dev.mysql.com/downloads/mysql/5.0.html
Linux (x86, glibc-2.2, static (Standard only), gcc) Standard 5.0.13 24.4M
The following should work on Debian 3.1 Sarge
mkdir -p /usr/local cd /usr/local # See http://dev.mysql.com/downloads/mysql/5.0.html for exact download location # They sometimes change it. wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-standard-5.0.13-rc-linux-i686.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/ tar zxvf mysql-standard-5.0.13-rc-linux-i686.tar.gz groupadd mysql useradd -g mysql mysql ln -s /usr/local/mysql-standard-5.0.13-rc-linux-i686 mysql cd mysql scripts/mysql_install_db --user=mysql chown -R root . chown -R mysql data chgrp -R mysql . To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system. on debian you can put it in /etc/init.d/ and run update-rc.d mysql.server defaults /etc/my.cnf : in the file my.cnf You may have to change the socket to: (This may only apply to Debian) socket = /var/run/mysqld/mysqld.sock To start MySQL cd /usr/local/mysql/bin/ ./mysqld_safe --user=mysql & If you later need to Shutdown MySQL cd /usr/local/mysql/bin/ ./mysqladmin -uroot -p shutdown To Test that MySQL is Running: cd /usr/local/mysql/bin/ ./mysql -p mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.00 sec) QUIT;
Preparing MySQL 5 for AstBill
Make sure MySQL 5 is running.
cd /usr/local/mysql/bin (Or where you installed MySQL)
./mysqld_safe --user=mysql &
cd /usr/local/mysql/bin
Create the AstBill database:
./mysqladmin -u root password 'mysql_root_pw' (If you already have a root password for mysql you can ignore this)
./mysqladmin create astbill -p
./mysql --user=root -p astbill < /home/astbill/astbill-0.9.0.5/database/astbill.sql
./mysql --user=root -p astbill < /home/astbill/astbill-0.9.0.5/database/astbill_proc.sql
Grant access to the AstBill database:
./mysql --user root -p
Set the correct permissions for the user astbilluser.
mysql> GRANT ALL PRIVILEGES ON astbill.* TO astbilluser@localhost IDENTIFIED BY 'astbill419';
Query OK, 0 rows affected (0.00 sec)
Since we are using MySQL 5, we convert back to old password hashing algorithm for compatibility reasons.
mysql> SET PASSWORD FOR 'astbilluser'@'localhost' = OLD_PASSWORD('astbill419');
Query OK, 0 rows affected (0.00 sec)
**Note the default mysql username/password is astbilluser/astbill419.
Copy the correct my.cnf to the /etc/my.cnf for your system.
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
If you are using Debian and many other Linux you have to change the following in /etc/my.cnf
[client]
socket = /var/run/mysqld/mysqld.sock
[mysqld]
socket = /var/run/mysqld/mysqld.sock
In Debian you also have to do the following to ensure correct permissions for mysqld.sock
mkdir -p /var/run/mysqld
chown -R mysql:www-data /var/run/mysqld
To Test that MySQL is Running:
cd /usr/local/mysql/bin/
./mysql -p
mysql> use astbill;
Database changed
mysql> show tables;
+------------------------------+
| Tables_in_astbill |
+------------------------------+
| astaccount |
| astbrand |
| astcdr |
| astconference |
| astcountrycode |
| astcreditres |
| astcurrency |
| astdialplan |
| astemailtext |
| astextension |
| asthardware |
| asthardwareid |
| astinvoice |
| astinvoiceline |
| astlog |
| astpayment |
| astpricelist |
| astpricelistghost |
| astreseller |
| astroute |
| aststatus |
| asttenant |
| asttrunk |
| astuser |
| asv_friend |
| asv_iax |
| asv_peers |
| asv_sip |
| asv_trunk_dialplan |
| asv_trunk_dialplan2 |
| asv_voicemail |
| asvaccount |
| asvaccount2 |
| asvaccountcalls |
| asvaccountpaid |
| asvaccountprice |
| asvbill |
| asvcall |
| asvprice |
| asvprice_group |
| asvprice_uk |
| asvprice_uk_all |
| asvprice_usa |
| pbx_access |
| pbx_accesslog |
| pbx_aggregator_category |
| pbx_aggregator_category_feed |
| pbx_aggregator_category_item |
| pbx_aggregator_feed |
| pbx_aggregator_item |
| pbx_authmap |
| pbx_blocks |
| pbx_book |
| pbx_boxes |
| pbx_cache |
| pbx_comments |
| pbx_contact_category |
| pbx_contact_directory |
| pbx_directory |
| pbx_files |
| pbx_filter_formats |
| pbx_filters |
| pbx_flood |
| pbx_forum |
| pbx_history |
| pbx_locales_meta |
| pbx_locales_source |
| pbx_locales_target |
| pbx_menu |
| pbx_moderation_filters |
| pbx_moderation_roles |
| pbx_moderation_votes |
| pbx_node |
| pbx_node_access |
| pbx_node_comment_statistics |
| pbx_node_counter |
| pbx_permission |
| pbx_poll |
| pbx_poll_choices |
| pbx_profile_fields |
| pbx_profile_values |
| pbx_queue |
| pbx_role |
| pbx_search_index |
| pbx_search_total |
| pbx_sequences |
| pbx_sessions |
| pbx_system |
| pbx_term_data |
| pbx_term_hierarchy |
| pbx_term_node |
| pbx_term_relation |
| pbx_term_synonym |
| pbx_url_alias |
| pbx_users |
| pbx_users_roles |
| pbx_variable |
| pbx_vocabulary |
| pbx_vocabulary_node_types |
| pbx_watchdog |
+------------------------------+
100 rows in set (0.01 sec)
mysql> show procedure status;
+-------------+-------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
| Db | Name | Type | Definer | Modified | Created | Security_type | Comment |
+-------------+-------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
| astbill | astCreateAcc | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | astCreateAccount | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateAddcdr | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateCost | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateGetTrunk | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateReserveCredit | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateSale | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
| astbill | RateStarDead | PROCEDURE | root@localhost | 2005-10-04 10:05:29 | 2005-10-04 10:05:29 | DEFINER | |
+-------------+-------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
8 rows in set (0.01 sec)
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| astbill |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
QUIT;
cd /usr/local/mysql
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-standard-5.0.13-rc-linux-i686.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/
tar zxvf mysql-standard-5.0.13-rc-linux-i686.tar.gz
cd /usr/local/mysql
bin/mysqladmin -uroot -p shutdown
cp -fr /usr/local/mysql/data/* /usr/local/mysql-standard-5.0.13-rc-linux-i686/data/
cd /usr/local
rm mysql
ln -s mysql-standard-5.0.13-rc-linux-i686 mysql
cd mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
# To start MySQL
bin/mysqld_safe --user=mysql &
By Mohamed at Wed, 2005-10-12 02:58
I had a rought time installing Php-mysql and mysql 5.0.13 and I have notice that other people are having the same issue. This is how I made it work on my system. My installation is from a fresh install.
1. I downloaded Asterisk@home BETA 3 and installed on my system. This has Cento4 and asterisk 1.2 beta.
2. Then did " yum update" to update linux
3. the did " yum remove mysql-server" ( this is to uninstall mysql 4.1 that is installed by default and all the dependencies. )
4. download thesee three packages form mysql.com site
MySQL-server-standard-5.0.13-0.rhel3
MySQL-client-standard-5.0.13-0.rhel3
MySQL-shared-compat-5.0.13-0 –(package includes clientlibXXXX.14 and clientlibxxxxx.15. this is the package that will resolve the clientlibxxxx dependencies when installing php-mysql)
5. installed php-mysql using yum by typeing - "yum install php-mysql"
6. Install perl-DBD-MySQ using yum by typing- "yum install perl-DBD-MySQL"
7. The rest of the steps I followed the installation instruction that came with astbill.
I hope this will help.
Thanks
Mohamed Omar
Some machines have mysql.sock as /var/run/mysqld/mysqld.sock
This is not compatible with Perl library by default
Use the below commands to create a symlink.
mkdir -p /var/lib/mysql
cd /var/lib/mysql
ln -s /var/run/mysqld/mysqld.sock mysql.sock