mariadbHow to add user to Mariadb?
Adding a user to MariaDB is a simple process.
- Log in to the MariaDB server as the root user:
mysql -u root -p
- Create a new user with the CREATE USER command:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
- Grant the user privileges with the GRANT command:
GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
- Flush the privileges to make sure the changes take effect:
FLUSH PRIVILEGES;
- Exit the MariaDB shell:
EXIT;
The new user is now ready to use.
Helpful links
More of Mariadb
- What type to use for a year in Mariadb?
- How to use XA transactions in Mariadb?
- How to work with XML in Mariadb?
- How to check version of Mariadb?
- How to install Mariadb on Ubuntu?
- How to list users in Mariadb?
- How to use UUID in Mariadb?
- How to get current year in Mariadb?
- How to use xtrabackup in Mariadb?
- How to change wait_timeout in Mariadb?
See more codes...