Mysql
Opened this issue · 5 comments
cloudscode commented
Mysql
cloudscode commented
连接数
mysql 5.5 150 左右
mysql 5.6 200-300左右
cloudscode commented
MySQL查看和修改wait_timeout
全局查看wait_timeout值
show global variables like 'wait_timeout';
修改全局wait_timeout值
set global wait_timeout=28800;
cloudscode commented
查询用户权限
show grants for root@'127.0.0.1'
cloudscode commented
登录
mysql -h 127.0.0.1 -uroot -p
cloudscode commented
mysql 给表和字段加注释
ALTER TABLE table_name COMMENT='这是表的注释';
ALTER table table_name MODIFY `column_name` datetime DEFAULT NULL COMMENT '这是字段的注释'
add column
alter table tablename add up smallint(4) not Null DEFAULT 0 comment '更新状态' AFTER `status`;
add index
ALTER TABLE tablename ADD INDEX xxx_index ( type, topic, title);