MySQL - Create Database



MySQL - Create Database


A database is a collection of data. MySQL allows us to store and retrieve the data from the database in a efficient way. In MySQL, we can create a database using the CREATE DATABASE statement. But, if database already exits, it throws an error. To avoid the error, we can use the IF NOT EXISTS option with the CREATE DATABASE statement.


Create Database Using mysqladmin :


You would need special privileges to create or to delete a MySQL database. So assuming you have access to the root user, you can create any database using the mysql mysqladmin binary.


Example

Here is a simple example to create a database called TUTORIALS

[root@host]# mysqladmin -u root -p create TUTORIALS
Enter password:******

This will create a MySQL database called TUTORIALS.



MySQL TRIGGERS

MySQL - Triggers

posted on 2019-11-29 21:44:07 - mysql Tutorials


Grant_ Revoke Privilege

MySQL - Grant_ Revoke Privilege

posted on 2019-11-26 23:15:04 - mysql Tutorials


MySQL Vs SQL

MySQL Vs SQL

posted on 2019-11-25 05:02:26 - mysql Tutorials


how to use range in golang

how to use range in golang

posted on 2022-05-03 08:28:11 - Go lang Tutorials


find variable type in golang

find variable type in golang

posted on 2022-05-03 05:24:55 - Go lang Tutorials


for loops in golang

for loops in golang

posted on 2022-05-03 04:27:40 - Go lang Tutorials