摘要:
1.连接 mysql –u root –p; 2.导入sql source 文件位置 3.显示,使用数据库 show databases; use 某数据库; 4.显示数据表,和字段 show tables; desc 某数据表 5.更改某个字段类型 alter table 某数据表 modify 字段名 类型(datetime not null); 参考:MySQL导入.sql文件及常... 阅读全文
摘要:
1.sql和索引 慢查询配置 show variables like 'slow%'; //查询慢查询日志位置,查询慢查询是否开启 set global log_queries_not_using_indexes=on; //开启查询没索引的字段 set global slow_query_log=on; //开启慢查询 在mysql配置文件my.cnf的[mysqld... 阅读全文