Giter Club home page Giter Club logo

mysql-course's Introduction

README

Read this in other languages: English

这是GeekHour的《一小时MySQL入门课程》中的配套数据,包括了课程中使用的SQL语句和数据文件。

Course Links

数据的导入方法:

安装好MySQL之后,进入MySQL的命令行界面,创建一个名为game的数据库:

create database game;

然后退出MySQL的命令行界面,在终端中执行如下命令来导入数据:

mysql -u root -p game < game.sql

示例演示: Alt text

数据: Alt text

数据的导入方法:

安装好MySQL之后,进入MySQL的命令行界面并按照下面的步骤来创建一个数据库:

  1. 打开终端,输入如下命令来登录MySQL:
mysql -u your_username -p

将your_username替换为你的MySQL用户名,然后会提示你输入MySQL密码。

登录成功后,你应该会看到MySQL的提示符:

mysql>
  1. 输入如下命令来创建一个名为game的数据库:
CREATE DATABASE game;
  1. 你可以通过如下命令来确认数据库是否创建成功:
SHOW DATABASES;
  1. 退出MySQL的命令行界面:
exit;
  1. 在终端中执行如下命令来导入数据:
mysql -u root -p game < game.sql

里面还有一些其他数据,可以用来练习:

  • city_data:**省市区三级联动数据,包括各区域的经纬度和身份证前六位。
  • game.npc: 三国题材游戏武将数据。
  • company: MySQL官方提供的示例公司数据。
  • sakila: MySQL官方提供的示例电影租赁数据。
  • shop: 一个简单的电商数据,包括商品、订单、用户等信息。
  • world: MySQL官方提供的示例世界国家和城市数据。

示例: Alt text

mysql-course's People

Contributors

geekhall avatar dongqihouse avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.