mysql my username code example
Example 1: mysql current user
-- mysql current user:
SELECT USER();
-- or
SELECT CURRENT_USER();
Example 2: create user mysql
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
-- mysql current user:
SELECT USER();
-- or
SELECT CURRENT_USER();
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';