mysql
Check if MySQL User Exists on Command Line (and in Puppet)
If you are using Linux, there is simple way to check if a user exists in MySQL: echo `mysql -u root -p**[your root password]** -e 'use mysql; SELECT user FROM user;'` | grep '[user name]' Executing this command will exit with return code 0 if the