Friday 13 September 2019

MySQL/Maria Database

MySQL/Maria Database

%Change password of existing user
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');

%create user
CREATE USER foo2@test IDENTIFIED BY 'password';
CREATE OR REPLACE USER foo2@test IDENTIFIED BY 'password';
CREATE USER IF NOT EXISTS foo2@test IDENTIFIED BY 'password';


%remove user
DROP USER bob;

%create user and then grant prevalence 
CREATE USER 'dba'@'%' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON *.* TO 'dba'@'%' ;


%show all the users and details 
SELECT User FROM mysql.user;
SELECT host, user, password FROM mysql.user;
show grants for 'vivek'@'%';



%show all databases 
show databases;

Monday 9 September 2019

Learn Programing





https://www.geeksforgeeks.org/

https://www.ntu.edu.sg/home/ehchua/programming/index.html