A2b 1.5.1 has MySQL SUPER Privilege Problem

chrisxiao

Joined
Feb 14, 2010
Messages
10
Likes
0
Points
0
#1
I install latest Elastix 1.6 that comes with A2B 1.3. When I try to install latest A2B 1.5.1. The provided mysql scripts have bugs, and will eventually failed due to lacking SUPER privilege in creating trigger and view. After painfully searching internet, I install the DB with no error prompts. I document this process here that may help other users.
The package provides two scripts for DB
1) a2biling-createdb-user.sql -- creates user and grants permission
2) install-db.sh -- create db schema
Before you do any thing, both files need to change, (I removed comments):
a2billing-create-user.sql should be:

use mysql;

delete from user where User='a2billinguser';
delete from db where User='a2billinguser';

GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'%' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'localhost.localdomain' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT CREATE VIEW ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;

create DATABASE if not exists `mya2billing`;

--------------------------------
install-db.sh should be:

#!/bin/bash

echo ""
echo "Install A2Billing DataBase"
echo "-----------------------------"
echo ""

echo "Enter Database Name : "
read dbname

echo "Enter Hostname : "
read hostname

echo "Enter UserName : "
read username

echo "Enter Password : "
read password

echo mysql --user=$username --password=$password --host=$hostname $dbname

cat a2billing-schema-v1.4.0.sql UPDATE-a2billing-v1.4.0-to-v1.4.1.sql UPDATE-a2billing-v1.4.1-to-v1.4.2.sql UPDATE-a2billing-v1.4.2-to-v1.4.3.sql UPDATE-a2billing-v1.4.3-to-v1.4.4.sql UPDATE-a2billing-v1.4.4-to-v1.4.4.1.sql UPDATE-a2billing-v1.4.4.1-to-v1.4.5.sql UPDATE-a2billing-v1.4.5-to-v1.5.0.sql UPDATE-a2billing-v1.5.0-to-v1.5.1.sql| mysql --user=$username --password=$password --host=$hostname $dbname

# cat a2billing-mysql-schema-v1.3.0.sql UPDATE-a2billing-v1.3.0-to-v1.3.1.sql UPDATE-a2billing-v1.3.3-to-v1.3.4.sql UPDATE-a2billing-v1.3.4-to-v1.4.0.sql a2billing-prefix-table-josko-v1.4.0.sql UPDATE-a2billing-v1.4.0-to-v1.4.1.sql UPDATE-a2billing-v1.4.1-to-v1.4.2.sql UPDATE-a2billing-v1.4.2-to-v1.4.3.sql UPDATE-a2billing-v1.4.3-to-v1.4.4.sql UPDATE-a2billing-v1.4.4-to-v1.4.4.1.sql UPDATE-a2billing-v1.4.4.1-to-v1.4.5.sql UPDATE-a2billing-v1.4.5-to-v1.5.0.sql UPDATE-a2billing-v1.5.0-to-v1.5.1.sql | mysql --user=$username --password=$password --host=$hostname $dbname


# All done, exit ok
exit 0

------------------------------------------
Then, you do the following three commands, the second command is to fix privilege bugs in MySQL 5.0.77(I tried to use later version with no success:

mysql -uroot -peLaStIx.2oo7 <a2billing-createdb-user.sql

mysql_fix_privilege_tables --password=eLaStIx.2oo7

sh install-db.sh


:D
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,900
Messages
130,884
Members
17,561
Latest member
marouen
Top