You're either running a very old version of FreeRADIUS, or you edited the MySQL queries and broke them.
The default configuration in v3 (mods-config/sql/main/mysql/queries.conf) contains:
... AcctStartTime = FROM_UNIXTIME(%{integer:Event-Timestamp}), \ ...
Which works.
Use the standard queries that come with FreeRADIUS.
Alan DeKok.
Sorry Alan, i am using docker freeradius v3.0.16. and my (mods-config/sql/main/mysql/queries.conf) file: start { # # Insert a new record into the sessions table # query = "\ INSERT INTO ${....acct_table1} \ (${...column_list}) \ VALUES \ ('%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{Realm}', \ '%{NAS-IP-Address}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ NULL, \ '0', \ '%{Acct-Authentic}', \ '%{Connect-Info}', \ '', \ '0', \ '0', \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ '', \ '%{Service-Type}', \ '%{Framed-Protocol}', \ '%{Framed-IP-Address}')" still i am facing "(Incorrect datetime value: '1552805684' for column 'acctstarttime' at row 1)" Here are debug logs: (8) sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query} freeradius | (8) sql: --> type.start.query freeradius | (8) sql: Using query template 'query' freeradius | rlm_sql (sql): Reserved connection (14) freeradius | (8) sql: EXPAND %{User-Name} freeradius | (8) sql: --> 12345@@TM11 freeradius | (8) sql: SQL-User-Name set to '12345@@TM11' freeradius | (8) sql: EXPAND INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}', %{%{integer:Event-Timestamp}:-date('now')}, %{%{integer:Event-Timestamp}:-date('now')}, NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}') freeradius | (8) sql: --> INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress) VALUES ('1801000A-00079105', '67d23904224156d50faf08b6890cab2e', '12345@@TM11', '', '192.168.0.4', '0', 'Wireless-802.11', 1552805682, 1552805682, NULL, '0', 'RADIUS', 'CONNECT Unknown Radio', '', '0', '0', '00:0c:29:67:6d:ec', '9c:4e:36:9c:71:18', '', '', '', '10.0.1.24') freeradius | (8) sql: Executing query: INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress) VALUES ('1801000A-00079105', '67d23904224156d50faf08b6890cab2e', '12345@@TM11', '', '192.168.0.4', '0', 'Wireless-802.11', 1552805682, 1552805682, NULL, '0', 'RADIUS', 'CONNECT Unknown Radio', '', '0', '0', '00:0c:29:67:6d:ec', '9c:4e:36:9c:71:18', '', '', '', '10.0.1.24') freeradius | (8) sql: ERROR: rlm_sql_mysql: ERROR 1292 (Incorrect datetime value: '1552805682' for column 'acctstarttime' at row 1): 22007 freeradius | (8) sql: SQL query returned: server error freeradius | rlm_sql (sql): Released connection (14) Please help me.