Results 1 to 4 of 4

Thread: How to connect MySQL Database to cakePHP v3.0 using XAMPP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    95

    How to connect MySQL Database to cakePHP v3.0 using XAMPP

    Good morning/evening to all members here!

    I have a problem to connect the database of MySQL to cakePHP v3.0

    I already follow the instructions here

    when I run localhost/nameOfMyWebsite

    this is the result

    Name:  Untitled.jpg
Views: 710
Size:  14.2 KB

    another screenshot on phpMyAdmin

    Name:  Untitled1.jpg
Views: 789
Size:  22.8 KB

    cakePHP version: v3.0
    XAMPP version: v5.6.8 VC11

    I saw a user post a fix here

    but in my "C:\xampp\htdocs\cake" there are no app folder so that I can configure the database.php
    Last edited by MeSH; Jul 1st, 2015 at 07:22 AM.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,836

    Re: How to connect MySQL Database to cakePHP v3.0 using XAMPP

    Then you need to find it...

    I woudln't expect to find it in the htdocs folder... but rather a couple levels down from there. xampp installs I've worked with in the past typically point xampp\htdocs\wwwroot for the root of the site... this is so that you can put things into htdocs for reference but still keep them out of the public zone. Go back to your htdocs folder and look at some of the other folders in there ... at some point you'll find the right public folder in which will be your cake install and your database.php file to set up the database access.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2014
    Posts
    95

    Re: How to connect MySQL Database to cakePHP v3.0 using XAMPP

    Quote Originally Posted by techgnome View Post
    Then you need to find it...

    I woudln't expect to find it in the htdocs folder... but rather a couple levels down from there. xampp installs I've worked with in the past typically point xampp\htdocs\wwwroot for the root of the site... this is so that you can put things into htdocs for reference but still keep them out of the public zone. Go back to your htdocs folder and look at some of the other folders in there ... at some point you'll find the right public folder in which will be your cake install and your database.php file to set up the database access.

    -tg
    inside C:\xampp\ folder I-type in the search box "database.php" but no luck... so what's the problem? it is the new version of cakePHP?

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,650

    Re: How to connect MySQL Database to cakePHP v3.0 using XAMPP

    Quote Originally Posted by MeSH View Post
    inside C:\xampp\ folder I-type in the search box "database.php" but no luck... so what's the problem? it is the new version of cakePHP?
    Take a look at the "Config" folder for a file named "app.php" : http://book.cakephp.org/3.0/en/quick...-configuration

    Then change the values of these: http://i.imgur.com/0jitvoJ.png

    Use the correct db username and password. In WAMP, the default the username is "root" and there's no password (if you haven't set one manually). Don't know about XAMPP. Also make sure that you have created the db. Take a look at the quick start guide if you are not familiar with CakePHP.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width