/ Sweet home / Blog / Archives / Doctrine: connexion à MySQL par un socket /

Doctrine: connexion à MySQL par un socket

C'est peut-être moi mais je trouve que la documentation de Doctrine explique assez mal comment se connecter à MySQL via un socket unix. Voici l'exemple de la documentation officielle sur les DSN:

mysql://user@unix(/path/to/socket)/pear

Personnellement je n'ai jamais réussi à me connecter avec ça. Par contre avec cette version ça marche beaucoup mieux:

mysql://user:password@localhost/monschema;socket=/var/run/mysqld/mysqld.sock

Last update: 2010-09-05 07:16:06


<< Bye bye WordPress !
Zend_Form, Zend_Validate >>
 

Comment this





Benchmark ! :-)

  1. dispatch
    time  : 0.0486
    memory: 540.9 kb
  2. cms\controllers\Index::norouteAction: find published page
    time  : 0.0051
    memory: 210.16 kb
  3. cms\controllers\Index::norouteAction: find template
    time  : 0.0001
    memory: 1.22 kb
  4. cms\controllers\Index::norouteAction: find layout
    time  : 0.0001
    memory: 1.13 kb
  5. cms\models\Page::getPublishedChildren
    time  : 0.0272
    memory: 373.33 kb
  6. cms\models\Page::getAncestors
    time  : 0.0089
    memory: 305.22 kb
  7. cms\models\Page::getParent
    time  : 0.0088
    memory: 303.63 kb
  8. cms\models\Page::getPublishedLeftSibling
    time  : 0.0035
    memory: 102.84 kb
  9. cms\models\Page::getPublishedRightSibling
    time  : 0.0043
    memory: 101.97 kb
  10. cms\models\Page::getPublishedComments
    time  : 0.0010
    memory: 28.01 kb