环境
Windows 7 中 VirtualBox 上的 Fedora 19 和 MariaDB
安装
yum install perl-SQL-Translator
脚步
生成转储:
[username@hostname ~] mysqldump -u root -pmysql_root_password database_name > example.sql
生成图表:
[username@hostname ~] sqlt-graph -f MySQL -o example.png -t png example.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.
链接
编辑
在第 5 行的以下 SQL 中也会出现错误:
DROP TABLE IF EXISTS `test_table`;
CREATE TABLE `test_table` (
`my_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`my_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
LOCK TABLES `test_table` WRITE;
UNLOCK TABLES;