“数据库不存在”symfony 1.4x中的sfDatabaseException

时间:2016-03-18 13:17:48

标签: php mysql symfony-1.4 propel

错误:

Database "mtlindia" does not exist.

http://localhost/training/web/index.php

我所制作的文件中的更改

  1. 训练/应用/前端/配置/ factories.yml文件

    storage:
     class: sfPDOSessionStorage        # sfNoStorage disables session storage completely.
    param:
    db_table: sessions      # Name of the table storing the sessions
    database: mtlindia          # Name of the database connection to use
    # Optional parameters
    db_id_col: session_id           # Name of the column storing the session id
    db_data_col: value              # Name of the column storing the session data
    db_time_col: created_datetime   # Name of the column storing the session timestamp
    
  2. 的database.yml

       prod:
      propel:
     param:
     hostspec:           mydataserver
    username:           myusername
    password:           xxxxxxxxxx
    
    all:
    propel:
     class:                sfPropelDatabase
     param:
    phptype:            mysql     # Database vendor
     hostspec:           localhost
    database:           mtlindia
     username:           root
    password:           
     port:               80
     encoding:           utf8      # Default charset for table creation
     persistent:         true      # Use persistent connections
    
  3. database.yml.dst

        dev:
      propel:
        param:
          classname:  DebugPDO
          host:       'ucudev_mtl'
          dsn:        'oci:dbname=mtlindia'
          username:   root
          password:   
      sessions_db:
        class:        sfPDODatabase
        param:
          classname:  DoctrinePDO
          dsn:        'oci:dbname=mtlindia'
          username:   root
          password:  
          encoding:   utf8
          persistent: false
          pooling:    false       
    
    • 我试图在Windows中刷新缓存。
    • 任何建议都是最受欢迎的,尽管我在symfony 1.4版本中是新的。
  4. 错误

    500 | Internal Server Error | sfDatabaseException
     Database "mtlindia" does not exist.
    
     stack trace
    at ()
    in SF_ROOT_DIR\lib\vendor\symfony\lib\database\sfDatabaseManager.class.php line 109 ...
      }
    
    
       // nonexistent database name
    
       throw new sfDatabaseException(sprintf('Database "%s" does not exist.', $name));
    
      }
    

0 个答案:

没有答案