官术网_书友最值得收藏!

Creating a database in MySQL

Before we begin with the implementation of our back end, we need to add a new database that we can use.

You are free to do this via the command line or phpMyAdmin. As we have just installed phpMyAdmin, we are going to use it, of course.

You can run raw SQL commands in the SQL tab of phpMyAdmin. The corresponding command to create a new database looks as follows:

CREATE DATABASE graphbook_dev CHARACTER SET utf8 COLLATE utf8_general_ci;

Otherwise, you can follow the next steps to use the graphical method. In the left-hand panel, click on the New button.

You will be presented with a screen like the following. It shows all databases including their collation of your MySQL server:

Enter a database name, such as graphbook_dev, and then choose the uft8_general_ci collation. After doing so, click on Create.

You will see a page that says, No tables found in database, which is correct (for now). This will change later, when we have implemented our database models, such as posts and users.

In the next chapter, we will start to set up Sequelize in Node.js, and will connect it to our SQL server.

主站蜘蛛池模板: 大冶市| 黔江区| 武义县| 祁阳县| 双柏县| 西藏| 麻栗坡县| 越西县| 台南县| 谢通门县| 彩票| 澎湖县| 合江县| 安国市| 玛曲县| 长岛县| 唐海县| 开封县| 雷山县| 乌拉特前旗| 巴塘县| 泗阳县| 梅州市| 策勒县| 隆回县| 乌恰县| 浙江省| 福清市| 和平区| 衡东县| 澄迈县| 房产| 辽阳县| 阳信县| 佛冈县| 周至县| 墨玉县| 正定县| 长海县| 南木林县| 日土县|