Re: mysql connection refused

2010-11-15 Thread rogwei
This is a dev environment where the application server is a VBox host.
The MySQL server is a VBox guest machine on the VBox host. phpmyadmin
runs from a browser on the VBox host, so it *is* using tcp. Everything
was working fine until I upgraded the guest OS from 9.10 to 10.04. I
think I might have changed the skip-networking option during the
initial MySQL install and it must have been reset to the default
127.0.0.1 setting during the upgrade. I changed the bind-address
option to 0.0.0.0 in the my.cnf, and now it works fine. Thanks for
your help.

On Nov 12, 9:49 pm, Anatoliy Dimitrov  wrote:
> I can't believe you are connecting to MySQL from PHPMYADMIN with
> absolutely the same details. The error means that the application
> cannot connect to the MySQL server on that port. By default on decent
> Ubuntu MySQL listens only on the local interface 127.0.0.1 and not on
> all IPs. You can check it with:
>
> netstat -ntap |grep 3306
>
> tcp        0      0 127.0.0.1:3306          0.0.0.0:*
> LISTEN      -
>
> Thus if you have been connecting to the external IP before you will
> not be able to do so any longer (unless you reconfigure MySQL of
> course).
>
> Thus try using 127.0.0.1 for MySQL hostname.
>
> Best regards,
> Anatoli
>
> On Nov 12, 11:56 pm, rogwei  wrote:
>
>
>
>
>
>
>
> > The subject search phrase returns 0 items in this group which
> > surprises me a little, and google isn't. Anyway, I upgraded my DB
> > server Ubuntu 9.10 to 10.04 LTS, and now when I try to access my
> > application I get the following warning and a missing database table
> > error. One factoid, I CAN connect with phpmyadmin using the same host
> > and credentials.
>
> > The only my.cnf file on the server uses port 3306. Not sure what to do
> > or whose issue this is. Any help?
>
> > Warning (2): mysql_connect() [function.mysql-connect]: [2002]
> > Connection refused (trying to connect via tcp://x.x.x.x:3306) [CORE/
> > cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
> > Code | Context
> > $config =       array(
> >         "persistent" => false,
> >         "host" => "x.x.x.x",
> >         "login" => "x",
> >         "password" => "",
> >         "database" => "xx",
> >         "port" => "3306",
> >         "driver" => "mysql",
> >         "prefix" => ""
> > )
> > mysql_connect - [internal], line ??
> > DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
> > dbo_mysql.php, line 552
> > DboSource::__construct() - CORE/cake/libs/model/datasources/
> > dbo_source.php, line 143
> > ConnectionManager::getDataSource() - CORE/cake/libs/model/
> > connection_manager.php, line 114
> > Model::setDataSource() - CORE/cake/libs/model/model.php, line 2818
> > Model::__construct() - CORE/cake/libs/model/model.php, line 469
> > AclNode::__construct() - CORE/cake/libs/model/db_acl.php, line 62
> > ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 141
> > DbAcl::__construct() - CORE/cake/libs/controller/components/acl.php,
> > line 237
> > AclComponent::__construct() - CORE/cake/libs/controller/components/
> > acl.php, line 58
> > Component::_loadComponents() - CORE/cake/libs/controller/
> > component.php, line 249
> > Component::init() - CORE/cake/libs/controller/component.php, line 78
> > Controller::constructClasses() - CORE/cake/libs/controller/
> > controller.php, line 487
> > Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186
> > Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
> > [main] - /Users/Roger/Sites/uypBarebones/index.php, line 84

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: mysql connection refused

2010-11-13 Thread Anatoliy Dimitrov
I can't believe you are connecting to MySQL from PHPMYADMIN with
absolutely the same details. The error means that the application
cannot connect to the MySQL server on that port. By default on decent
Ubuntu MySQL listens only on the local interface 127.0.0.1 and not on
all IPs. You can check it with:

netstat -ntap |grep 3306

tcp0  0 127.0.0.1:3306  0.0.0.0:*
LISTEN  -

Thus if you have been connecting to the external IP before you will
not be able to do so any longer (unless you reconfigure MySQL of
course).

Thus try using 127.0.0.1 for MySQL hostname.

Best regards,
Anatoli

On Nov 12, 11:56 pm, rogwei  wrote:
> The subject search phrase returns 0 items in this group which
> surprises me a little, and google isn't. Anyway, I upgraded my DB
> server Ubuntu 9.10 to 10.04 LTS, and now when I try to access my
> application I get the following warning and a missing database table
> error. One factoid, I CAN connect with phpmyadmin using the same host
> and credentials.
>
> The only my.cnf file on the server uses port 3306. Not sure what to do
> or whose issue this is. Any help?
>
> Warning (2): mysql_connect() [function.mysql-connect]: [2002]
> Connection refused (trying to connect via tcp://x.x.x.x:3306) [CORE/
> cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
> Code | Context
> $config =       array(
>         "persistent" => false,
>         "host" => "x.x.x.x",
>         "login" => "x",
>         "password" => "",
>         "database" => "xx",
>         "port" => "3306",
>         "driver" => "mysql",
>         "prefix" => ""
> )
> mysql_connect - [internal], line ??
> DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
> dbo_mysql.php, line 552
> DboSource::__construct() - CORE/cake/libs/model/datasources/
> dbo_source.php, line 143
> ConnectionManager::getDataSource() - CORE/cake/libs/model/
> connection_manager.php, line 114
> Model::setDataSource() - CORE/cake/libs/model/model.php, line 2818
> Model::__construct() - CORE/cake/libs/model/model.php, line 469
> AclNode::__construct() - CORE/cake/libs/model/db_acl.php, line 62
> ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 141
> DbAcl::__construct() - CORE/cake/libs/controller/components/acl.php,
> line 237
> AclComponent::__construct() - CORE/cake/libs/controller/components/
> acl.php, line 58
> Component::_loadComponents() - CORE/cake/libs/controller/
> component.php, line 249
> Component::init() - CORE/cake/libs/controller/component.php, line 78
> Controller::constructClasses() - CORE/cake/libs/controller/
> controller.php, line 487
> Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186
> Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
> [main] - /Users/Roger/Sites/uypBarebones/index.php, line 84

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: mysql connection refused

2010-11-13 Thread cricket
MySQL is probably not listening for TCP connections. Try changing the
host param to 'localhost', which will use a UNIX socket connection.

On Fri, Nov 12, 2010 at 3:56 PM, rogwei  wrote:
> The subject search phrase returns 0 items in this group which
> surprises me a little, and google isn't. Anyway, I upgraded my DB
> server Ubuntu 9.10 to 10.04 LTS, and now when I try to access my
> application I get the following warning and a missing database table
> error. One factoid, I CAN connect with phpmyadmin using the same host
> and credentials.
>
> The only my.cnf file on the server uses port 3306. Not sure what to do
> or whose issue this is. Any help?
>
> Warning (2): mysql_connect() [function.mysql-connect]: [2002]
> Connection refused (trying to connect via tcp://x.x.x.x:3306) [CORE/
> cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
> Code | Context
> $config =       array(
>        "persistent" => false,
>        "host" => "x.x.x.x",
>        "login" => "x",
>        "password" => "",
>        "database" => "xx",
>        "port" => "3306",
>        "driver" => "mysql",
>        "prefix" => ""
> )
> mysql_connect - [internal], line ??
> DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
> dbo_mysql.php, line 552
> DboSource::__construct() - CORE/cake/libs/model/datasources/
> dbo_source.php, line 143
> ConnectionManager::getDataSource() - CORE/cake/libs/model/
> connection_manager.php, line 114
> Model::setDataSource() - CORE/cake/libs/model/model.php, line 2818
> Model::__construct() - CORE/cake/libs/model/model.php, line 469
> AclNode::__construct() - CORE/cake/libs/model/db_acl.php, line 62
> ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 141
> DbAcl::__construct() - CORE/cake/libs/controller/components/acl.php,
> line 237
> AclComponent::__construct() - CORE/cake/libs/controller/components/
> acl.php, line 58
> Component::_loadComponents() - CORE/cake/libs/controller/
> component.php, line 249
> Component::init() - CORE/cake/libs/controller/component.php, line 78
> Controller::constructClasses() - CORE/cake/libs/controller/
> controller.php, line 487
> Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186
> Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
> [main] - /Users/Roger/Sites/uypBarebones/index.php, line 84
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


mysql connection refused

2010-11-12 Thread rogwei
The subject search phrase returns 0 items in this group which
surprises me a little, and google isn't. Anyway, I upgraded my DB
server Ubuntu 9.10 to 10.04 LTS, and now when I try to access my
application I get the following warning and a missing database table
error. One factoid, I CAN connect with phpmyadmin using the same host
and credentials.

The only my.cnf file on the server uses port 3306. Not sure what to do
or whose issue this is. Any help?

Warning (2): mysql_connect() [function.mysql-connect]: [2002]
Connection refused (trying to connect via tcp://x.x.x.x:3306) [CORE/
cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
Code | Context
$config =   array(
"persistent" => false,
"host" => "x.x.x.x",
"login" => "x",
"password" => "",
"database" => "xx",
"port" => "3306",
"driver" => "mysql",
"prefix" => ""
)
mysql_connect - [internal], line ??
DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
dbo_mysql.php, line 552
DboSource::__construct() - CORE/cake/libs/model/datasources/
dbo_source.php, line 143
ConnectionManager::getDataSource() - CORE/cake/libs/model/
connection_manager.php, line 114
Model::setDataSource() - CORE/cake/libs/model/model.php, line 2818
Model::__construct() - CORE/cake/libs/model/model.php, line 469
AclNode::__construct() - CORE/cake/libs/model/db_acl.php, line 62
ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 141
DbAcl::__construct() - CORE/cake/libs/controller/components/acl.php,
line 237
AclComponent::__construct() - CORE/cake/libs/controller/components/
acl.php, line 58
Component::_loadComponents() - CORE/cake/libs/controller/
component.php, line 249
Component::init() - CORE/cake/libs/controller/component.php, line 78
Controller::constructClasses() - CORE/cake/libs/controller/
controller.php, line 487
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
[main] - /Users/Roger/Sites/uypBarebones/index.php, line 84

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en