duan19740319 2015-10-27 13:34
浏览 76

Doctrine:更新架构时的未知主机

I transferred my local project in One and One server, and I have a problem when I use console for update my entities. Here the error :

  [Doctrine\DBAL\Exception\ConnectionException]
  An exception occured in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: H?te inconnu.

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: H?te inconnu.

  [PDOException]
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: H?te inconnu.

  [Symfony\Component\Debug\Exception\ContextErrorException]
  Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: H?te inconnu.

Config.yml

doctrine:
    dbal:
        driver:   pdo_mysql
        host:     "db59XXXX8X55.db.1and1.com"
        port:     "null"
        dbname:   "db59XXXX55"
        user:     "dbo59xXXXXX55"
        password: ""
        charset:  UTF8

Thanks to your reply and sorry for my english (i'm french)

  • 写回答

1条回答 默认 最新

  • dongzhuo2010 2016-07-18 00:32
    关注

    Host cannot be resolved, probably due to mistaken url. Check it with your hosting provider (this time 1&1). Try first to connect manually with any MySQL remote software (MySQL Workbench, HeidiSQL, etc...)

    Define your port, don't leave it blank. (Try 3306 by default).

    Get rid of quotation marks, they are not mandatory. Leave blank fields when needed.

    It's strange to me that you would use a shared-hosting account with blank password. Probably you will need to specify a password.

    Link to complete documentation: http://symfony.com/doc/current/reference/configuration/doctrine.html

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题