MySQL: Tworzenie bazy z konsoli


DROP DATABASE IF EXISTS mydb;
CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER ‘myuser’@’%’ IDENTIFIED BY ‘****’;
CREATE USER ‘myuser’@’localhost’ IDENTIFIED BY ‘****’;
GRANT ALL ON mydb.* TO ‘myuser’@’%’ WITH GRANT OPTION;
GRANT ALL ON mydb.* TO ‘myuser’@’localhost’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

Leave a Reply

Your email address will not be published. Required fields are marked *