... You can create MySQL accounts in two ways:
By using statements intended for creating accounts, such as CREATE USER or GRANT. These statements cause the server to make appropriate modifications to the grant tables.
By manipulating the MySQL grant tables directly with statements such as INSERT, UPDATE, or DELETE. ... [full article