Tuesday, June 18, 2013

Re: Error: Mysql requires a database connection

Raxit,

   Did you edit the settings to match your User and password for your Mysql instance? Mysql is running?

Eric

On Tuesday, June 18, 2013 12:28:00 PM UTC-4, Raxit wrote:
Hi raj kumar,

I have added database.php file with same content under config folder still it gives same error. I am using cake php so it might be reason for this problem. I have check the mysql connection file under webroot, it is working perfectly fine but problem occurs when i call index.php.

Thanks
Raxit

On Tuesday, June 18, 2013 8:53:12 PM UTC+5:30, raj kumar Pustela wrote:
Hi..
     do u have database.php file in your config folder.
     
     If don't create database.php file in your config folder

      Follow below process .. it's as a simple.

create the database.php file and past the below code.

    <?php
class DATABASE_CONFIG {

public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'test',
'prefix'=>'zp_',
);
}


On Tue, Jun 18, 2013 at 4:56 PM, Raxit <rajpan...@gmail.com> wrote:

Hi,

I am facing this problem from past 5 days. Didn't find any solution. I have checked connection many times. my team have also checked all the connections with Mysql. File is also present under same path.

Error: Confirm you have created the file : app\Config\database.php.

Notice: If you want to customize this error message, create app\View\Errors\missing_connection.ctp.

Stack Trace

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+u...@googlegroups.com.
To post to this group, send email to cake...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: