“I needed a password eight characters long so I picked Snow White and the Seven Dwarfes.” — Nick Helm1
MySQL Account Management is often nebulous mess to new DBAs. Frank2 is a new MySQL with many years of Linux administration duties in his background and now he has been taking on more duties after his companies previous DBA departed. One of his co-workers was in the middle of a name change and could no longer access the need instance. Frank had run
mysql -u root mysql
mysql>UPDATE user SET Name='jjones' where Name='jsmith';
But Mrs. Jones was not able to access the database. Frank tried for a while to find the answer. To greatly simplify the MySQL authorization process, the sever checks the Host of a new connection, then the User and Password. Frank had checked all three. The name of the host Mrs. Jones used had not changed. Neither had the password. Only the account name.
I gave Frank my best Zen-like answer, “Flush privileges.”
“Is that it? ‘Flush privileges’ with a semi-colon at the end?” He gasped.
“Semi-colon or back-slash followed by a letter ‘G’ of either case.” He gave the simple two word command and suddenly Mrs. Jones was back into her tables3
- Best Jokes from the 2011 Fringe
- Name changed to protect the promised quantity of adult beverage for solving problem.
- Some administrative tools such as Workbench would have avoided this problem by performing the flush for the DBA. But Frank is trying to learn the CLI.