-
First we want to log in to MariaDB on a new Terminal window
-
sudo mysql -u root -p
- Note: Drop the -p option if your root user has no password
-
Next, simply use the following command, replacing <YOUR_DB> with your database name
-
Now, lets create a database User for this new DB
-
Now lets grant this user privileges to be able to use ALL databases in their entirety.
-
GRANT ALL PRIVILEGES ON *.* TO <YOUR_USER>@localhost IDENTIFIED BY "<USERS_PASSWORD>";
-
alternatively , if you want the user to only have access to the database you just created, run the following command instead:
-
GRANT ALL PRIVILEGES ON <YOUR_DB>.* TO <YOUR_USER>@localhost;
-
Finally run the following:
Posted by: admin
2023-10-25 14:24:00