How to create Database in ubuntu with command line

Please follow the below commands to create a database and user in ubuntu with command line

  1. mysql -u root
  2. CREATE DATABASE new_database;
  3. CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
  4. GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'lo
  5. FLUSH PRIVILEGES;
  6. exit;
  • database, ubuntu, ssh, comandline
  • 25 Users Found This Useful
Was this answer helpful?

Related Articles

VPS Server - First time user

Hi All,This blog is for first time VPS users. Please follow the below steps to check your VPS....

Backup restoration

Since backups are saved at various nodes to avoid data loss, we manage the backup and...

How To allow SQL Express traffic in windows firewall

Please follow the below steps to allow SQL express communication in the firewall. Open SQL...

How to change SQL authentication in SQL Express

Please follow the below steps Login to SQL Express using SQL management studio. Right-click...

Set Up Sending of Email in Plesk

To Set Up Sending of Email in Plesk, You need to follow the below Points   1. Go to Tools...