Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dealTek wrote:

> 
> Thanks for all the help folks,
> 
> 
> PHP-light-PDO-Class
> 
> ok well I found this...
> 
> https://github.com/poplax/PHP-light-PDO-Class
> 
> But it does not seem to recognize the port - I put the port as 8889 but
> keeps saying can't connect port 3306
> 
> Warning: PDO::__construct() [pdo.--construct]: [2002] Connection refused
> (trying to connect via tcp://127.0.0.1:3306) in
> /Users/revdave/Sites/php-fool/pdo3/PHP-light-PDO-Class-
master/class.lpdo.php
> on line 33 Connection failed: SQLSTATE[HY000] [2002] Connection refused
> 
> BTW: I tried to add the port a few places but it didn't work......
> 
> 
> How do we fix this?
> 
> 
> 
> ------ config.php
> 
> <?php
> $config = array();
> $config['Database'] = array();
> $config['Database']['dbtype'] = 'mysql';
> $config['Database']['dbname'] = 'tester';
> $config['Database']['host'] = '127.0.0.1';
> $config['Database']['port'] = 8889;
> $config['Database']['username'] = 'root';
> $config['Database']['password'] = 'root';
> $config['Database']['charset'] = 'utf8';
> ?>

Change host to localhost - your mysql may be configured not to accept 
requests via tcp.

> 
> ===============  class.lpdo.php
<SNIP>
> 
> 
> --
> Thanks,
> Dave - DealTek
> dealtek@xxxxxxxxx
> [db-3]

-- 
Cheers
David Robley

My karma ran over my dogma


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux