Creating a MySQL userAccess MySQL (Enter mysql) Type CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; Replacing newuser with the username you wish to use, the same with localhost using the server IP or server name and password with your desired password. The newuser will have no permissions at first To give all permissions -> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; Again replacing newuser and localhost Once you have done this, to load the user with the new permissions -> FLUSH PRIVILEGES; Creating a MySQL DatabaseTo create a database, it’s very simple -> create database db_name; Replacing db_name with whatever name you want to use for the database. You can then use -> show databases; This will show all databases on the server using MySQL. |
Creating a MySQL user in Linux Print
Modified on: Sun, 25 Nov, 2018 at 12:28 AM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.