MySQL Datenbank erstellen
CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Cloudy Cottonmouth
CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE nameOfYourDatabase;
USE nameOfYourDatabase;
CREATE TABLE nameOfTable(
id INT AUTO_INCREMENT,
first_name VARCHAR(100),
last_name VARCHAR(100),
email VARCHAR(50),
password VARCHAR(20),
PRIMARY KEY(id)
);
mysql> CREATE DATABASE pets;
Query OK, 1 row affected (0.01 sec)
MySQL implements a database as a directory that contains all files which correspond to tables in the database.
To create a new database in MySQL, you use the CREATE DATABASE statement with the following syntax:
CREATE DATABASE [IF NOT EXISTS] database_name
[CHARACTER SET charset_name]
[COLLATE collation_name]