CakePHP Database Configuration
May 22, 2007 at 5:41 am | In tutorial | 7 Comments
CakePHP Database Configuration
1. A copy of Cake’s database configuration file is found in /app/config/database.php.default. Make a copy of this file in the same directory, but name it database.php.
2. On http://localhost/phpmyadmin/ create your own database.
***We will be using the following data:
user: mine database name: mydatabase password : mypass3. Open database.php. (either notepad or dreamweaver)
4. Edit
class DATABASE_CONFIG
{
var $default = array(‘driver’ => ‘mysql’,
‘connect’ => ‘mysql_connect’,
‘host’ => ‘localhost’,
‘login’ => ‘mine’, //the user of your database
‘password’ => ‘mypass’, //the password of your database
‘database’ => ‘mydatabase’, //the name of your database
‘prefix’ => ”);
This is the first time and the last time that you will configure your database. You will be using a single database, you will just add tables.
5. Save database.php.
6. Open http://localhost/cake. You must see these two messages:
Your database configuration file is present.
Cake is able to connect to the database.
7 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.








hi. i installed php cake stable version .but i cannot able to set up the php cake.
but i set database to my system.
but home page is not displayed.pls help to give the detailed information.
Comment by sasi — June 12, 2007 #
hello…
Are you using XAMMP? What is the error that shows in your browser when you access http://localhost/cake/?
Maybe we can chat online to deal with your problem.
mariecon
Comment by mariecon — June 12, 2007 #
hi. thanks for you. i set the pages in cakephp modules.after i get the designs.
but my browser does not show the index.php in cakephp images.
Comment by sasi — June 12, 2007 #
am using cake…..in installation am getting error…..like its showing your database configuration is present and you can able to connect
to the database….but am not getting the output…its showing only this message….am written
all mvc codes
Comment by sahal — July 3, 2007 #
cn u help me on this….
Comment by sahal — July 3, 2007 #
hello…
i’m willing to help you.
What exactly the error is? I mean the message error,what it is?
mariecon
Comment by mariecon — July 3, 2007 #
Your database configuration file is present.
Cake is able to connect to the database.
Comment by dhanapal — September 17, 2008 #