Search code examples
mysqljoomladatabase-connectionremote-debugging

Local developing joomla with remote database


I am new to joomla and I am just setting my development enviroment. I use Eclipse and XAMPP and for now I set everything to show hello world and it's good. Now I must just set MySQL database. I have joomla installed before on my hosting with everything set and some plugins and extensions install and so on. I just downloaded this via FTP and I am trying to debug it on my localhost but with using database connection to remote server. Is it possible? I was trying to google it but I haven't luck so far. So is there a way how to do this? Maybe some little changes in config.php?


Solution

  • Ive not tested this, but you will need to modify the following in your local joomla configuration.php file to match those in the live site's configuration.php hosted on your server:

    public $dbtype = 'mysqli';
    public $host = 'localhost';
    public $user = 'yourusername';
    public $password = 'yourpassword';
    public $db = 'yourdatabasename';
    public $dbprefix = 'xxxxx_';
    

    Additionally, you will most likely have to allow development machine access to your database. This really depends on how your host/server is setup, but essentially you need to add your local computer's public IP address to the mysql access host list on the server so it can connect with the DB.