(document at [ Ссылка ] )
Tracing mySQL Queries from Vicidial Requests
Concept: Log all queries in mysql
(like SQL Profiler, but for mysql)
Techniques described in: [ Ссылка ]
Access server: Putty to viciDB
Open mysql: mysql
Access the ‘mysql’ database: use mysql;
Repeatable steps:
1) Enable trace logging: SET global general_log = 1;
2) Perform unique action (E.g.: unique string “202101212”)
3) Disable trace logging: SET global general_log = 0;
4) Search the trace log
select * from mysql.general_log where argument like '%202101212%';
(Tip) Search via MS-SQL:
SELECT * FROM OPENQUERY([VICIDB], 'select * from mysql.general_log where argument like '%202101212%'; ')
5) Start over, clear the trace log: truncate table mysql.general_log;
Alternatively can look at queries that take a long time to complete; just replace general_log with slow_log above.
Ещё видео!