DBA Hub

📋Steps in this guide1/1

Create database in mysql

-- Below commands can be used to create database

mysql configurationintermediate
by MYSQL
14 views
1

Create database in mysql

-- Below commands can be used to create database -- View the create database statement used for creating db

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
MariaDB [(none)]>
CREATE DATABASE testdb;
Query OK, 1 row affected (0.009 sec)
MariaDB [(none)]>
create database testdb1 character set UTF8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.009 sec)
MariaDB [(none)]>
SHOW CREATE DATABASE testdb1;
+----------+-----------------------------------------------------------------------------------------+
| Database | Create Database |
+----------+-----------------------------------------------------------------------------------------+
| testdb1 | CREATE DATABASE `testdb1` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ |
+----------+-----------------------------------------------------------------------------------------+
1 row in set (0.007 sec)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!