Monday, July 29, 2013

How to get Open ticket count for specic queue in OTRS by SQL query?

select count(*) from ticket
inner join queue on ticket.queue_id= queue.id
inner join ticket_state on ticket_state.id = ticket.ticket_state_id
where queue.name ='Postmaster' and ticket.ticket_state_id = 4

How to get table columns list from MySQL database?


SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tableName'

How to open 3306 port on Windows 2008 for MySQL?

In command line as administrator, run following command:
netsh advfirewall firewall add rule name="MySQL Server" action=allow protocol=TCP dir=in localport=3306

Reference:
http://www.activeservers.com/page3610203.aspx