摘要:
1、单例模式 饿汉模式 优点:执行效率高,性能高,没有任何的锁 缺点:某些情况下,可能会造成内存的浪费 public class MyStaticHungrySingleton { private static final MyStaticHungrySingleton myStaticHungry 阅读全文
摘要:
linux 添加用户,无权限修改passwd问题 1、首先检查 /etc/passwd 文件权限 [root@VM-0-3-centos tempfile]# lsattr /etc/passwd ia e-- /etc/passwd 文件的扩展属性多了 i a # i:不可修改权限# a:只追加权 阅读全文
摘要:
一、开启慢日志查询 1、查询开启 #慢查询是否开启和日志位置 show variables like 'slow_query%'; #慢查询时间 show variables like 'long_query_time'; #开启慢查询日志 set global slow_query_log='ON 阅读全文
摘要:
进入mysql数据库,修改数据库的内容 1, use mysql; 2,update user set authentication_string="" where User='root';//设 authentication_string 为空值 ,因为是连接这个加密的东西 先设密码为空 3,up 阅读全文