You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pierregermain edited this page May 3, 2016
·
6 revisions
-- Conectarse con usuario root
mysql -u root -p
-- Comprobación usuarios
use mysql
SELECT host, user, password FROM user;
-- Show Databases
show databases;
-- use database
use
-- show tables
show tables;
-- show columns;
describe
-- Anular command (clear)
\c
select * from users\c
-- Print command
\p
select * from users\p
-- Get Help
\h
-- Create User:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON databaseName . databaseTable TO 'newuser'@'localhost';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
-- Reload Priv's:
FLUSH PRIVILEGES;