MySQL
重置密碼
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('')
備份
mysqldump -h hostname -u username -p mydatabase > mydatabase.sql
建立帳號
mysql -e "CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'mypassword'; GRANT ALL PRIVILEGES ON . TO 'newuser'@'localhost'; FLUSH PRIVILEGES;" -u root -p
插入
INSERT INTO mydata (uuid, mynumber) VALUES ('275fb8566bcb11e69d34025fb2f1683d', 42);
Event
SET GLOBAL event_scheduler = ON;
CREATE EVENT
clear_executed_command
ON SCHEDULE EVERY 5 SECOND
DO
DELETE FROM command_queue WHERE mynumber = 42;
DROP EVENT clear_executed_command;