command-line - 如何在 Fedora 19 中通过命令行生成数据库图表?

标签 command-line fedora yum mariadb erd

我是 Linux 新手,刚刚在 VirtualBox 中安装了 Fedora 19。

我正在运行 MariaDB 并希望从命令行生成数据库图表。

我遇到了一些来自 SQLFairy 的输出示例:

http://nsaunders.wordpress.com/2009/01/11/easy-visualisation-of-database-schemas-using-sqlfairy/

http://www.christianbiggins.com/2008/11/er-diagrams-from-sql-files.html

http://techmania.wordpress.com/2008/06/09/creating-er-diagrams-from-sql/

这似乎是我所追求的类型。

我用 'yum search sqlfairy' 进行了 yum 搜索,但似乎没有任何结果。

谁能告诉我如何在 Fedora 19 中安装 sqlfairy,或者,如果这不可能,请推荐一款具有类似功能的产品?

编辑:

我找到了这个:https://admin.fedoraproject.org/pkgdb/acls/name/perl-SQL-Translator#f19

并通过 yum install perl-SQL-Translator 安装。

我现在正在尝试:

[me@my ~]  sqlt-graph -f MySQL -o mydatabase.png -t png mydatabase.sql

但出现错误:

ERROR (line 36): Invalid statement: Was expecting comment, 
or use, or set, or drop, or create, or alter, or insert, or 
delimiter, or empty statement
Error: translate: Error with parser 'SQL::Translator::Parser::MySQL':  
no results at /usr/bin/sqlt-graph line 195.

.sql 文件位于 home/me,这是我运行命令的地方。

最佳答案

解决方案是按照上面的步骤,通过对mysqldump命令使用以下命令解决了错误,然后上面的sqlt命令起作用了:

[username@hostname ~] mysqldump -u root -pmysql_root_password --no-data database_name > example.sql

关于command-line - 如何在 Fedora 19 中通过命令行生成数据库图表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17906937/

相关文章:

mysql putty命令删除重复项

java - AES 非法 key 大小错误仅发生在命令行中,但不会发生在 IDE 中

Docker:Fedora 25中的 "login attempt to https://hub.docker.com/v2/failed with status: 404 Not Found"

python - 在CentOS上清除并重新安装python

r - 在 RedHat 上安装 R 时出现依赖项不存在的错误

linux - 从 lsof(Linux 命令行)中提取字段/属性

php - 将 cURL 命令行转换为 PHP

sublimetext2 - Fedora 18 和 Sublime Text 2 : Unable to delete file

mysql - 无法安装 MySql Workbench

linux - CentOS yum 失败,出现 libcurl.so.4 错误,说 'undefined symbol: libssh2_agent_disconnect'