https://stackoverflow.com/questions/3049929/checking-if-mysql-user-exists
MySQL stores user data in a table called user in a database named mysql (by default). The following query will return 1 if a user with the specified username exists, 0 otherwise.
SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'username')
No comments:
Post a Comment