Canno将sql文件导入mysql [英] Canno import sql file into mysql

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

问题描述

第29行的错误1046(3D000):当我将sql文件导入mysql时没有选择数据库。

ERROR 1046 (3D000) at line 29: No database selected ,when I am importing a sql file into mysql.

推荐答案

嗯,错误很清楚。您需要选择要应用查询的数据库。

我假设您使用的是MySQL WorkBench,并且您已使用菜单项Database-> Connect to Database连接到数据库。 br />


为了在MySQL的脚本窗口中运行SQL查询,您需要明确定义数据库,例如

Well, the error is pretty clear. You need to select the database to apply the query to.
I assume here that you are using MySQL WorkBench and that you have connected to a database using the menu item Database->Connect to Database.

In order to run SQL queries in the script window in MySQL you need to either define the database explicitly like
SELECT * FROM DataBaseName.TableName



或选择默认数据库。

通常,您可以通过双击架构导航器中的数据库名称来执行此操作。




or select the default database.
Usually you do this by double clicking on a database name in the schema navigator.

.


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

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