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

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.

主站蜘蛛池模板: 景宁| 沁水县| 南溪县| 都昌县| 宿迁市| 合水县| 霞浦县| 双辽市| 庆城县| 绍兴县| 井陉县| 乌拉特前旗| 商河县| 高平市| 易门县| 东至县| 渭南市| 海南省| 金山区| 监利县| 永嘉县| 青州市| 西贡区| 白城市| 颍上县| 延津县| 类乌齐县| 黄骅市| 大同县| 霍山县| 仁化县| 佛坪县| 阿荣旗| 仙居县| 贵溪市| 密云县| 托克逊县| 石河子市| 汶川县| 楚雄市| 弋阳县|