Skip to main content

Posts

Showing posts with the label mysqld

list of mysql commands

here are tutorial list of mysql commands to preparing database for your web+cms needs enter database server by using mysql client  $ mysql -u root mysql to create database mysql> CREATE DATABASE namedb; to create user database and password mysql>CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; to grant access user to database create mysql>GRANT ALL ON namedb.* TO 'user'@'localhost'; to make configuration active mysql>FLUSH PRIVILEGES; to exit mysql mysql>EXIT to show user, host and password mysql>SELECT user,host,password FROM user; to show databases mysql>SHOW DATABASES; to open database mysql>USE namedb; to remove database mysql>DROP DATABASE namedb; to remove user mysql>DROP USER 'user'@'localhost'; to backup all databases mysql>MYSQLDUMP --all-databases > backup.sql to restore database mysql>MYSQL -u username -p < backup.sql