How to Create a New MySQL Database User

Posted on

login as root or other user with sufficient privileges mysql -h localhost -u root -p create new user CREATE USER username@localhost IDENTIFIED BY ‘password'; give new user privileges all privileges, all databases, ability to grant further privileges GRANT ALL ON *.* TO username@localhost WITH GRANT OPTION; some privileges, all databases GRANT INSERT, DELETE, UPDATE ON…Continue Reading

How to Backup and Restore a MySQL Database

Posted on

backup mysql database: mysqldump -v -h localhost -u username -p db_name > backup.sql restore mysql database: mysql -v –show-warnings -h localhost -u username -p db_name < backup.sql ​