从sql文件导入数据库 [英] Import database from sql file

查看:124
本文介绍了从sql文件导入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是sql的初学者.我有一个问题,如何从sql文件导入数据库.我尝试了导入脚本文件"选项,但是它不起作用.我附上了屏幕截图和我的sql文件

I'm beginner in sql. I have a question, how can I import the database from sql file. I tried option "import a script file" but it doesn't work. I attach a screenshots and my sql file

屏幕截图

sql文件

预先感谢您的帮助

推荐答案

要开始使用,您需要:

A .sql script file containing a CREATE TABLE command
MySQL Query Browser or phpMyAdmin
Other MySQL database tools will require similar steps.
An empty MySQL database already created

MySQL查询浏览器是MySQL GUI工具的一部分,可从以下网站获得 http://mysql.com/.这些相同的步骤可用于大多数其他MySQL管理员工具.

MySQL Query Browser is part of the MySQL GUI Tools available at http://mysql.com/. These same steps can be used for most other MySQL administrator tools.

Using the MySQL Query Browser, connect to your MySQL Server.
From the Schemata panel, select the database you intend to add the new database table to.
Choose File > Open Script.
Navigate to the .sql file you wish to import.
Click Open.
Select Execute.
Confirm that the new database table appears in the Schemata panel.

这篇关于从sql文件导入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆