This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » Install on ovh 90plan PDO connection pb  (3) 1 Vote(s)
Install on ovh 90plan PDO connection pb [message #75012] Tue, 17 March 2009 21:25 Go to next message
yogi13000  is currently offline yogi13000
Messages: 9
Registered: March 2009
Location: marseille
Junior Member
Hi,

It been 3 days i try to put my web site on ovh 90plan, you can see what kind of problem i have with this log :

[Tue Mar 17 19:50:41 2009] [error] [client XXX.XXX.XXX.XXX] [host www.prog-info.fr] Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)]

I try a lot of things but i don't find solution, it seem to be beacause i don't configure very well my sql connection on my file propel.ini or database.yml

My propel.ini :
propel.targetPackage       = lib.model
propel.packageObjectModel  = true
propel.project             = webmkt
propel.database            = mysql
propel.database.driver     = mysql
propel.database.url        = mysql:dbname=myDataBase;host=mysql5-51.90
#propel.database.url        = mysql:dbname=webmkt;host=localhost
propel.database.creole.url = ${propel.database.url}
propel.database.user       = xxxxxxxxx
propel.database.password   = xxxxxxxxx
#propel.database.user       = root
#propel.database.password   = 
propel.database.encoding   = utf8

; mysql options
propel.mysql.tableType     = InnoDB

propel.addVendorInfo       = true
propel.addGenericAccessors = true
propel.addGenericMutators  = true
propel.addTimeStamp        = true
propel.addValidators       = false

propel.useDateTimeClass       = true
propel.defaultTimeStampFormat = Y-m-d H:i:s
propel.defaultTimeFormat      = H:i:s
propel.defaultDateFormat      = Y-m-d

propel.schema.validate        = false
propel.samePhpName            = false
propel.disableIdentifierQuoting     = false
propel.emulateForeignKeyConstraints = true

; directories
propel.home                    = .
#propel.output.dir              = H:\wamp\www\workspaceEclipse\WebMkt\trunk
propel.output.dir              = \homez.31\proginfo
propel.schema.dir              = ${propel.output.dir}/config
propel.conf.dir                = ${propel.output.dir}/config
propel.phpconf.dir             = ${propel.output.dir}/config
propel.sql.dir                 = ${propel.output.dir}/data/sql
propel.runtime.conf.file       = runtime-conf.xml
propel.php.dir                 = ${propel.output.dir}
propel.default.schema.basename = schema
propel.datadump.mapper.from    = *schema.xml
propel.datadump.mapper.to      = *data.xml

; builder settings
propel.builder.peer.class              = plugins.sfPropelPlugin.lib.builder.SfPeerBuilder
propel.builder.object.class            = plugins.sfPropelPlugin.lib.builder.SfObjectBuilder
propel.builder.objectstub.class        = plugins.sfPropelPlugin.lib.builder.SfExtensionObjectBuilder
propel.builder.peerstub.class          = plugins.sfPropelPlugin.lib.builder.SfExtensionPeerBuilder
propel.builder.objectmultiextend.class = plugins.sfPropelPlugin.lib.builder.SfMultiExtendObjectBuilder
propel.builder.mapbuilder.class        = plugins.sfPropelPlugin.lib.builder.SfMapBuilderBuilder

propel.builder.addIncludes  = false
propel.builder.addComments  = true
propel.builder.addBehaviors = true





My database.yml :
prod:
  propel:
    param:
      hostspec: mysql5-51.90
      database: myDataBase
      username: xxxxxxxx
      password: xxxxxxxx
.
.
.
all:
  propel:
    class:        sfPropelDatabase
    param:
      phptype:    mysql     # Database vendor
      classname:  PropelPDO
      dsn:        mysql:dbname=webmkt;host=localhost
      username:   denis
      password:   xxxx
      encoding:   utf8
      persistent: true
      pooling:    true





Someone can help me ?

Thank in advance,

Denis
Re: Install on ovh 90plan PDO connection pb [message #75033 is a reply to message #75012 ] Wed, 18 March 2009 05:51 Go to previous messageGo to next message
joshcoady  is currently offline joshcoady
Messages: 52
Registered: June 2008
Location: Rohnert Park, CA
Member

Verify with your web host where the mysql server is located. It may be localhost, an ip address for another server or the server name of another server. Then where host or hostname is, use that for the setting. I dont remember what hostspec is, but try that also with the name of your mysql server location.

Also, database and dbname should contain the name of your database


Josh Coady
Symfony Tips & Tricks · Photo Blog · Easy Mortgage Calculator
Re: Install on ovh 90plan PDO connection pb [message #75108 is a reply to message #75033 ] Wed, 18 March 2009 19:44 Go to previous message
yogi13000  is currently offline yogi13000
Messages: 9
Registered: March 2009
Location: marseille
Junior Member
Thank's for your help joshcoady,

I found my problem!! Cool


It was because in my database.yml i don't change the dsn, it was my local connection settings :

i do this :


prod:
  propel:
    param:
      hostspec: mysql5-1
      database: DataBaseName
      username: xxxxxxxxx
      password: xxxxxxxxx

...

all:
  propel:
    class:        sfPropelDatabase
    param:
      phptype:    mysql     # Database vendor
      classname:  PropelPDO
      dsn:        mysql:dbname=DataBaseName;host=mysql5-1
      username:   denis
      password:   xxxx
      encoding:   utf8
      persistent: true
      pooling:    true


I modify this : dsn: mysql:dbname=DataBaseName;host=mysql5-1

It was really simple!! Very Happy

Bye
Previous Topic:Quick installation questions
Next Topic:Solved/forget it: Problem after deploy - Class 'sfPropelDatabase' not found
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software