I thought I would respond back to this in case someone else had the
same problem. I fixed it by changing my host in my Config/database.php
file to be 127.0.0.1 instead of being localhost.

Andrew

On Oct 4, 2:02 pm, andrewperk <[email protected]> wrote:
> Well it turns out it did not fix the problem all the way, I'm further
> than I was before. I hastily didn't check the whole process of baking.
> After entering bake, telling it what I want to bake, and then telling
> it to use the default database config I get another error saying it
> can't connect to my MySQL server through the socket, it also says
> there's no tables in my database when there are.
>
> Thanks for any help.
>
> Here's the error that bake gives me:
>
> <pre class="cake-debug"><a href="javascript:void(0);"
> onclick="document.getElementById('cakeErr1-trace').style.display =
> (document.getElementById('cakeErr1-trace').style.display == 'none' ?
> '' : 'none');"><b>Warning</b> (2)</a>: mysql_connect() [http://php.net/
> function.mysql-connect]: Can't connect to local MySQL server through
> socket '/var/run/mysqld/mysqld.sock' (2) [<b>CORE/cake/libs/model/
> datasources/dbo/dbo_mysql.php</b>, line <b>561</b>]<div id="cakeErr1-
> trace" class="cake-stack-trace" style="display: none;"><a
> href="javascript:void(0);" onclick="document.getElementById('cakeErr1-
> code').style.display = (document.getElementById('cakeErr1-
> code').style.display == 'none' ? '' : 'none')">Code</a> | <a
> href="javascript:void(0);" onclick="document.getElementById('cakeErr1-
> context').style.display = (document.getElementById('cakeErr1-
> context').style.display == 'none' ? '' : 'none')">Context</a><pre
> id="cakeErr1-context" class="cake-context" style="display: none;">
> $config =       array(
>         "persistent" => false,
>         "host" => "*****",
>         "login" => "*****",
>         "password" => "*****",
>         "database" => "*****",
>         "port" => "*****",
>         "driver" => "mysql",
>         "prefix" => "*****"
> )</pre><pre class="stack-trace">mysql_connect - [internal], line ??
> DboMysql::connect() - CORE/cake/libs/model/datasources/dbo/
> dbo_mysql.php, line 561
> DboSource::__construct() - CORE/cake/libs/model/datasources/
> dbo_source.php, line 143
> ConnectionManager::getDataSource() - CORE/cake/libs/model/
> connection_manager.php, line 114
> ModelTask::getAllTables() - CORE/cake/console/libs/tasks/model.php,
> line 838
> ModelTask::listAll() - CORE/cake/console/libs/tasks/model.php, line
> 781
> ModelTask::getName() - CORE/cake/console/libs/tasks/model.php, line
> 864
> FixtureTask::__interactive() - CORE/cake/console/libs/tasks/
> fixture.php, line 118
> FixtureTask::execute() - CORE/cake/console/libs/tasks/fixture.php,
> line 71
> BakeShell::main() - CORE/cake/console/libs/bake.php, line 116
> ShellDispatcher::dispatch() - CORE/cake/console/cake.php, line 377
> ShellDispatcher::ShellDispatcher() - CORE/cake/console/cake.php, line
> 139
> [main] - CORE/cake/console/cake.php, line 666</pre></div></pre><pre
> class="cake-debug"><a href="javascript:void(0);"
> onclick="document.getElementById('cakeErr2-trace').style.display =
> (document.getElementById('cakeErr2-trace').style.display == 'none' ?
> '' : 'none');"><b>Warning</b> (2)</a>: mysql_query() expects parameter
> 2 to be resource, boolean given [<b>CORE/cake/libs/model/datasources/
> dbo/dbo_mysql.php</b>, line <b>613</b>]<div id="cakeErr2-trace"
> class="cake-stack-trace" style="display: none;"><a
> href="javascript:void(0);" onclick="document.getElementById('cakeErr2-
> code').style.display = (document.getElementById('cakeErr2-
> code').style.display == 'none' ? '' : 'none')">Code</a> | <a
> href="javascript:void(0);" onclick="document.getElementById('cakeErr2-
> context').style.display = (document.getElementById('cakeErr2-
> context').style.display == 'none' ? '' : 'none')">Context</a><pre
> id="cakeErr2-context" class="cake-context" style="display: none;">$sql
> =       "SHOW TABLES FROM `caketesting`;"</pre><pre class="stack-
> trace">mysql_query - [internal], line ??
> DboMysql::_execute() - CORE/cake/libs/model/datasources/dbo/
> dbo_mysql.php, line 613
> DboMysql::listSources() - CORE/cake/libs/model/datasources/dbo/
> dbo_mysql.php, line 626
> ModelTask::getAllTables() - CORE/cake/console/libs/tasks/model.php,
> line 848
> ModelTask::listAll() - CORE/cake/console/libs/tasks/model.php, line
> 781
> ModelTask::getName() - CORE/cake/console/libs/tasks/model.php, line
> 864
> FixtureTask::__interactive() - CORE/cake/console/libs/tasks/
> fixture.php, line 118
> FixtureTask::execute() - CORE/cake/console/libs/tasks/fixture.php,
> line 71
> BakeShell::main() - CORE/cake/console/libs/bake.php, line 116
> ShellDispatcher::dispatch() - CORE/cake/console/cake.php, line 377
> ShellDispatcher::ShellDispatcher() - CORE/cake/console/cake.php, line
> 139
> [main] - CORE/cake/console/cake.php, line 666</pre></div></pre>Your
> database does not have any tables.
>
> On Oct 3, 10:09 am, andrewperk <[email protected]> wrote:
>
>
>
>
>
>
>
> > Thanks you guys, that fixed it.
>
> > On Sep 27, 4:43 am, LipeDjow <[email protected]> wrote:
>
> > > Also check if php5-mysql is enabled for the php CLI.
>
> > > LipeDjow

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to