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

Error creating a new DataBase
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=11126
Page 1 of 1

Author:  jansalex [ Tue Jan 13, 2015 12:59 pm ]
Post subject:  Error creating a new DataBase

On Centos 7 and Mysql : Server version: 5.5.40-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

A fresh install A2billing 2.0.16. When I try to create a new Database I got this error :



[root@xxx mysql-5.x]# ./install-db.sh

Install A2Billing DataBase
-----------------------------
Enter Database Name :
test
Enter Hostname :
localhost
Enter UserName :
*****
Enter Password :
*****
mysql --user=***** --password=***** --host=localhost test
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Ctrl-C

ALTER TABLE cc_charge DROP currency' at line 1

Any idea ?

Author:  bucasia [ Tue Jan 13, 2015 10:36 pm ]
Post subject:  Re: Error creating a new DataBase

I would just check that you can run the command manually. If you can then the script might be corrupt. Maybe in DOS format.

Try something like -

mysql --user=*** --password=*** test < a2billing-schema-v1.4.0.sql

If that works you could just run the DB updates manually. There are quite a few now though :-)

Author:  jansalex [ Tue Jan 13, 2015 11:05 pm ]
Post subject:  Re: Error creating a new DataBase

Thanks for the answer.

I tried to put the command manually :

mysql-5.x]# mysql --user=*** --password=**** test < a2billing-schema-v1.4.0.sql
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Ctrl-C' at line 1

Same error.

Author:  bucasia [ Tue Jan 13, 2015 11:13 pm ]
Post subject:  Re: Error creating a new DataBase

I'm not really sure where this error is coming from -

jansalex wrote:
to use near 'Ctrl-C' at line 1


What's on line 1 of the sql file? Does anything look obviously wrong.

Author:  jansalex [ Tue Jan 13, 2015 11:20 pm ]
Post subject:  Re: Error creating a new DataBase

Wow !

This is the content of the file :

Ctrl-C -- exit!

Author:  jansalex [ Tue Jan 13, 2015 11:23 pm ]
Post subject:  Re: Error creating a new DataBase

I untar the A2billing tar file again, and now all scripts are correct.

Thanks a lot for your help.

Author:  bucasia [ Tue Jan 13, 2015 11:42 pm ]
Post subject:  Re: Error creating a new DataBase

No problem. Weird. No idea where that came from :-)

Author:  jansalex [ Wed Jan 14, 2015 9:03 am ]
Post subject:  Re: Error creating a new DataBase

Now I can create a new empty DB, but when I try to restore my A2billing DB 2.0 version, the scripts do nothing and the size changes.

Before executing the script : 1359 ago 27 16:10 UPDATE-a2billing-v2.0-to-v2.0.3.sql

After execute the script : 16 ago 27 16:10 UPDATE-a2billing-v2.0-to-v2.0.3.sql

And the content of the scrit is :

Ctrl-C -- exit!

---------------------------------------------------------------------------------------------------------------------

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