推进逆向工程mysql数据库

时间:2011-04-30 23:47:18

标签: php mysql propel

按照此处的说明操作:http://www.propelorm.org/wiki/Documentation/1.5/Existing-Database

我创建了一个文件夹并放置了一个文件“build.properties”,内容为:

propel.project = test

# The Propel driver to use for generating SQL, etc.
propel.database = mysql

# This must be a PDO DSN
propel.database.url = localhost:dbname=test
propel.database.user = root
propel.database.password = root

在cmd中我输入推进式反转

我收到错误消息:从元数据构建XML时出错:找不到驱动程序

经过几个小时的搜索,我觉得我已经尝试了每个配置。我在php.ini文件中启用了驱动程序:

extension=php_mysql.dll 
extension=php_pdo_mysql.dll

我正在使用Zend Server

任何想法?

2 个答案:

答案 0 :(得分:7)

改变这个:

  

propel.database.url = localhost:dbname = test

到这个

propel.database.url = mysql:host = localhost; dbname = test

答案 1 :(得分:0)

注意 作为答案输入,因为评论不能让我很好地格式化代码

我不认为这与推进有关; PDO驱动程序安装出了问题。

假设以下内容生成异常,您可以发布输出(编辑成问题)吗?

<?php
$dbh = new PDO('mysql:host=localhost;dbname=test', 'root', 'root');
?>