asterisk2billing.org
http://forum.asterisk2billing.org/

Error in install script ./install-db.sh
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=12568
Page 1 of 1

Author:  lams [ Sat Aug 27, 2016 6:08 pm ]
Post subject:  Error in install script ./install-db.sh

[a2billing 2.2.0, Debian 8, asterisk 13]

I have spent weeks trying to install and reinstall a2billing - I keep getting stuck in meeting Checkpoint 1 : Check that the database (my2billing) and that (97) tables have been created. I ONLY GET 94 TABLES

When I run the ./install-db.sh script, I get a series of errors:

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1067 (42000) at line 44: Invalid default value for 'datelastrun'

ERROR 1067 (42000) at line 34: Invalid default value for 'stopdate'

ERROR 1146 (42S02) at line 91: Table 'mya2billing.cc_version' doesn't exist
this gets repeated from line 91 to line 31 below
ERROR 1146 (42S02) at line 31: Table 'mya2billing.cc_version' doesn't exist

Anyone experienced this? Close to giving up on a2billing

Author:  lams [ Sun Aug 28, 2016 12:20 am ]
Post subject:  Re: Error in install script ./install-db.sh

I think I have figured out the solution..

This is caused by the new mysql 5.7.6 having a sql_mode set by default to NO_ZERO_IN_DATE,NO_ZERO_DATE. This is what throws up the errors and prevents the creation of three tables.

The solution is to add the following in my.cnf under [mysqld]

sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Then delete the old mya2billing database and re-run the two steps:
mysql -u root -p < DataBase/mysql-5.x/a2billing-createdb-user.sql followed by
./install-db.sh

It runs smoothly without errors and generates 97 tables.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/