Hello,

I just spent some time trying to set up dynamic mysql tables. The log keeps 
saying:

Dec 13 15:26:01 INFO ( out/mysql ): *** Purging cache - START (PID: 20506) ***
Dec 13 15:26:01 ERROR ( out/mysql ): PRIMARY 'mysql' backend trouble.
Dec 13 15:26:01 ERROR ( out/mysql ): The SQL server says: Table 
'pmacct.acct_out_20161213-1525' doesn't exist

The table 'pmacct.acct_out_20161213-1525' definitly exists - pmacct did 
succesfully create it using the sql_table_schema from my config. After some 
debugging I found that the problem is the "-" sign I am using for my table 
names, as it is considered as a special character for mysql. To use special 
characters in mysql you need to use the  quote character - the backtick. 

Its not a problem for me to go without these characters and its probably not a 
good practice to use them in first place. But still maybe its worth thinking 
about to wrap the dynamic sql statements generation into backticks to get 
around this problem if someone needs to use such characters? 

Best regards
Martin

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to