Skip to content

Added User MySQL Database Server

Kamil Jarmusik edited this page May 23, 2024 · 4 revisions

Added User MySQL database

  1. Creating a new database for the application, login as root and execute query:

CREATE DATABASE IF NOT EXISTS scadalts;

  1. Creating e new user, loign as root and execute queries:
USE scadalts;
CREATE USER IF NOT EXISTS '<mysql-username>'@'<mysql-host>' IDENTIFIED BY '<mysql-password>';
GRANT ALL ON scadalts.* TO '<mysql-username>'@'<mysql-host>';
FLUSH PRIVILEGES;
  1. Example:
USE scadalts;
CREATE USER IF NOT EXISTS 'scadalts_user'@'localhost' IDENTIFIED BY 'scadalts_pass';
GRANT ALL ON scadalts.* TO 'scadalts_user'@'localhost';
FLUSH PRIVILEGES;