Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚开始使用 Rails,并且一直在使用 mysql2 gem。我意识到在 Rails 上,迁移用于更改数据库中的表。
所以我只是想知道我是否可以在 Mysql 中查看表?还有一些方法可以使插入、删除等更有效?
在您的 rails 目录中,您可以使用 shell 命令rails dbconsole使用您的 rails 项目的配置直接连接到数据库,并在 shell 中编写原始 SQL。
rails dbconsole
您可以使用 mysql 客户端与 mysql 数据库进行交互。我将从阅读 mysql 的文档开始。