MySQL 数据在 Toad Edge 中可见,但在 CLI 中不可见

标签 mysql mariadb command-line-interface toad

在名为 rest_api 的 MySQL 数据库中,使用 Toad Edge GUI 查看 mobiles 表时可以看到数据:

enter image description here

enter image description here

但是,根据 CLI,该表中没有数据: enter image description here

这 6 行数据是使用 Toad Edge 添加到表中的。

作为实验,我使用 CLI 添加了一行,结果如下: enter image description here

有趣的是,Toad Edge 可以看到所有行: enter image description here

为什么 CLI 看不到使用 Toad Edge GUI 添加的 6 行?


编辑#1-
以下是 mobiles 的表定义: enter image description here


编辑 #2 -
另一行已通过 CLI 添加到 mobiles 表中。当 Toad Edge 关闭然后重新打开时,它只能看到 CLI 添加的 2 行:

enter image description here


编辑 #3 -
这种情况发生在 Windows 10 操作系统上。 XAMPP 安装在此计算机上,MySQL 是 XAMPP 安装的一部分。

最佳答案

事实证明,应用程序右下角的 AutoCommit 设置为“关闭”:

enter image description here

双击它可以将其切换为“ON”。之后就正常工作了。例如,当使用 Toad Edge 中的脚本将数据插入表中时,CLI 中针对同一表的查询显示数据就在那里。

enter image description here

关于MySQL 数据在 Toad Edge 中可见,但在 CLI 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57757985/

相关文章:

mysql - 设置外键的默认值?

PHP/SQL - 模糊搜索结果分页

mysql - Mariadb 中止连接错误,没有用户名

mysql - mysql 游标中使用 Group_Concat 返回错误结果

php - 从 CLI OSX 退出 PHP

vue.js - 在 Vue.js CLI(webpack 配置)中更改 chunk-vendors.js 的路径

php - AJAX load more posts script out put nothing, no warnings, no notices, 没有数据

java - 使用 @ManyToMany 和 @ManyToOne 关系创建表

linux - 一个输出文件的更多命令?

mysql - 如何从mysql表中查找元素的前驱和后继?