root密码重置 修改root用户的密码: /*登录mysql*/ mysql -uroot -p123 /*切换数据库*/ use mysql /*修改root用户的密码*/ update user set password=password('1234') where user='root'; 如果你忘记了root用户的密码,那么你就无法登录mysql,也就不能修改密码了.这时登录mysql就比较麻烦: 打开一个窗口,执行:mysqld --skip-grant-tables: 这时再开
设置pgsql默认用户posgres的密码 1.确认pgsql是开启的 /etc/init.d/postgresql status 2.使用默认用户登录 sudo su postgres 3.进入psql客户端 命令为 sudo -u postgres psql 进入之后就可以写sql了 4.执行第三步如果出现“postgres is not in the sudoers file. This incident will be reported.”提示则需要在sudoers里面加上postgr
今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 因为是用户密码过期了 解决办法: 登陆MySQL命令行,执行 set password=password("password"); flush privileges; #设置用户密码永不过
redis作为一个高速数据库,在互联网上,必须有对应的安全机制来进行保护,方法有2,如下. 1.比较安全的办法是采用绑定IP的方式来进行控制. 请在redis.conf文件找到如下配置 # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # # bind 127.0