mysql>update mysql.user set Password=PASSWORD('secret')where user='root';
mysql>flush privileges;
mysql>^D
service mysql stop
service mysql start
~OR~
service mysqld stop
service mysqld start
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
1
2
ALTER USER'root'@'localhost'IDENTIFIED BY'secret';
dscacheutil -flushcache System Preferences -> Network -> Advanced -> DNS -> Add 1.1.1.1, 8.8.4.4 and 8.8.8.8 at the top. If they are already there, CHANGE THE ORDER!
Recently, I had a client site outage. AWS had a major EBS failure on Zone B, and one of the instances never recovered. One of the major issues was the inability to connect to the RDS service:
1
2
3
# mysql -h yourDB.yourRDS.us-east-1.rds.amazonaws.com -u meyadmin -p
Enter password:
ERROR1129(00000):Host'ip-X-X-X-X.ec2.internal'isblocked because of many connection errors;unblock with'mysqladmin flush-hosts'
It turns out two steps were required for resolution: 1. Reboot the instance to get network access […]
Flush the mail queue: # postfix flush OR # postfix -f View the mail queue: # mailq Delete all mail from the queue: # postsuper -d ALL Delete all mails in the deferred queue: # postsuper -d ALL deferred