07- MySQL Create Database

0
288

MySQL Create Database

In order to create a MySQL database, you must have the privileges to Create or Delete Database. But for this tutorial, let’s assume that you have access to your server in PHPMyAdmin.

Creating MySQL Database using MySQLi and PDO

Basically, the statement used to create database is “CREATE DATABASE”. In our case, we will be using ‘mysqltutorial’ as our database name.

 

Example MySQLi (Object-Oriented):

 

Example of MySQLi (Procedural):

 

Example of PDO:

Our Previous Topic called:  06- MySQL Connect

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.