MySQL报错当出现Error Code: 1046. No database selected Select the default DB to be used by double-clicking

当MySQL’出现Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar.(错误代码:1046。未选中数据库通过在侧边栏的SCHEMAS列表中双击其名称选择要使用的默认DB)错误时
主要的原因是没有指定数据库,对于我来说,只需要MySQL语句中加上use 数据库名即可或者选中左侧列表中的数据库名即可
在这里插入图片描述

你可能感兴趣的:(python_数据库,mysql,数据库,database)