View Mysql version

SELECT VERSION();

View general_log log related information

Check whether it is open and the path

SHOW VARIABLES LIKE 'general%';

Open

set GLOBAL general_log='ON';

Time zone

View current time zone

show variables like "%time_zone%";

Set to UTC time zone

# vim /etc/my.cnf ##在[mysqld]区域中加上
default-time_zone = '+8:00'
# /etc/init.d/mysqld restart ##重启mysql使新时区生效

Reset the isolation level

SET {SESSION | GLOBAL} TRANSACTION ISOLATION LEVEL {READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE};

universe_king
3.4k 声望678 粉丝