* TO 'root' 'localhost' WITH GRANT OPTION | | GRANT PROXY ON '' '%' TO 'root' 'localhost' WITH GRANT OPTION | +-+ 2 rows in set ( 0. ![]() The root user should have permissions similar to the following: MariaDB > SHOW GRANTS +-+ | Grants for root localhost | +-+ | GRANT ALL PRIVILEGES ON *. Then issue a SHOW GRANTS to check what your logged-in user's permissions are. The syntax for the CREATE USER statement in MySQL is: CREATE USER useraccount IDENTIFIED BY password Parameters used: useraccount: It is the name that the user wants to give to the database account. ![]() The output should be something like the following: MariaDB > SELECT USER (), CURRENT_USER () +-+-+ | USER () | CURRENT_USER () | +-+-+ | root localhost | root localhost | +-+-+ 1 row in set ( 0. The prompt should change to show that you are in the mysql> 3. Type in the root password for this account and press Enter. To do so, enter the following command: sudo mysql u root p 2. To debug I would first check to make sure you are logged in as root with: SELECT USER (), CURRENT_USER () Before you can create a new MySQL user, you need to open a terminal window and launch the MySQL shell as the root user. These follow this general syntax: CREATE USER ' username ' ' host ' IDENTIFIED WITH authenticationplugin BY ' password ' After CREATE USER, you specify a username. A new syntax was added for creating callables. That query should work if you're logged in as the MariaDB root user. Once you have access to the MySQL prompt, you can create a new user with a CREATE USER statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |