2:离谱操作 vi /usr/zookeeper/zookeeper-3.4.10/conf/zoo.cfg
插入: # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. #do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/usr/zookeeper/zookeeper-3.4.10/zkdata # the port at which the clients will connect clientPort=2181 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1
获取临时密码:grep "temporary password" /var/log/mysqld.log k:qmdilTZ5Zz 登录mysql: mysql -uroot -p 手动输入密码,复制大概率出错
密码策略设置
1 2 3 4
设置密码强度为低级:set global validate_password_policy=0; 设置密码长度:set global validate_password_length=4; 修改本地密码:alter user 'root'@'localhost' identified by '123456'; 退出:\q
设置远程登录:
1 2 3 4 5
以新密码登录:mysql -uroot -p123456 创建用户:create user 'root'@'%'identified by'123456'; 允许远程连接:grant all privileges on *.* to 'root'@'%' with grant option; 刷新权限:flush privileges; 创建数据库:create database xxx;