Monday 28 May 2018

create user and schema MySQL

navigate to this folder - /usr/local/mysql/bin

Login using : mysql -uroot -ppassword

Then create new User and Schema using below commands:

CREATE USER transport@'%' IDENTIFIED BY 'transport';
GRANT ALL PRIVILEGES ON * . * TO 'transport'@'%';

CREATE SCHEMA IF NOT EXISTS transport;
GRANT ALL ON transport.* TO 'transport'@'%';


Then login back using mysql -utransport -ptransport

To see the port on which mysql is running : SHOW GLOBAL VARIABLES LIKE 'PORT';

No comments:

Post a Comment