Mysql

From open-voip.org

Jump to: navigation, search

change to specific DB:

 use snort;

Show tables:

 show tables;

tables format:

 describe table_name;

optimize indexes:

optimize table mytable;

fix corrupted table:

mysqlcheck -r mytable


show global variables like 'max_connections';
show status like 'Conn%'
show status like '%onn%';
show processlist; 

CALL mysql.rds_kill(5292)
CALL mysql.rds_kill_query(thread-ID)

dump and import

 Backup: mysqldump -h localhost -uroot -p ta > /file
 Import: mysql –h local.tradair.com –uroot –p ta < filename
Personal tools