连不上mysql时一般有以下四种报错:1:Can't connect to MySQL server2:Lost connection to MySQL server3:Sorry, due to line fault, temporarily unable to browse, we are dealing with.4:MySQL server has gone away一:Can't connect to MySQL server 可能的原因:1,mysql服务端没有启起来2,网络不通(ipta...【阅读全文】
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:...【阅读全文】
法一:select current_date as Systemtime;查询:2017-03-08法二:select now() as Systemtime;查询:2017-03-08 17:49:46法三:select sysdate() as Systemtime;查询:2017-03-08 17:50:01【阅读全文】