Posted in AWS, LAMP Stack, Linux

MYSQL DATABASE

Database : A database is an organized collection of data.

Installing MySQL-server in Ubuntu

  • sudo apt-get install mysql-server // Installing the mysql
  • sudo mysql_secure_installation // securing the mysql server
A permission followed by the choice of strength of the password, type the password and continue with the default settings.

Creating a database in MySQL

  • sudo mysql -u root -p
  • enter the password // Connecting to MySQL
  • create database Akhil0087 // Creating a database in mysql
  • use Akhil0087 // Entering into the database
  • create table Topics(
  • Topic VARCHAR(255) NOT NULL,
  • created_on DATE,
  • Author VARCHAR(255) NOT NULL
  • ) ENGINE=INNODB; // Creating a table in the database
  • describe Topics; // To get the following output.
  • insert into Topics (Topic, created_on, Author) values ('AWS', '2019-11-21', 'Akhil'); // Providing the values for each described field.

Interested in further more operation related to database

Unknown's avatar

Author:

I'm currently working as a cloud migration consultant in Deloitte. My days are primarily spent on cloud with a high focus on migrations and gcp management. On my downtime I prefer to be a 3d designer.

One thought on “MYSQL DATABASE

Leave a comment