Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Joomla: update connection information for a MySQL database
If you needed to update the connection between the MySQL database and your Joomla site (in order to avoid the error "Database connection error: could not connect to mysql" for example) then this guide details how to proceed.
Items to change
Here is the information to adapt in the configuration.php file for your Joomla site to work (as a general rule, a prefix has simply been added in front of the existing database name and the user name):
- the name of the MySQL database ( bddname before, abcd_bddname after for example)
- the host server of the MySQL database ( mysql.votredomaine.ch before, abcd.myd.infomaniak.com after for example)
- the user name which accesses the MySQL database ( userbdd before, abcd_userbdd after for example)
- the path of the following two directories: /tmp and /logs
Edit the Joomla configuration.php file
- open the Manager (manager.infomaniak.com)
- go to Web Hosting
- click on the hosting/domain name concerned
- under Sites , click on the relevant site
- click on the Advanced settings button
- under the PHP tab click on PHP Information
- at line _SERVER['DOCUMENT_ROOT'] copy the path to the right
- in the left side menu, click on Databases
- find and store your current MySQL information according to the list above (help: https://faq.infomaniak.com/1981)
- in the left side menu, click on FTP/SSH
- create an FTP account: https://faq.infomaniak.com/1982
- connect via FTP: https://faq.infomaniak.com/1130
- edit the configuration.php file located in the root folder of your Joomla
- find the relevant paragraph and update the 4 pieces of information (according to the list above)
- don't forget to replace the old path (including "www") with the new path:
- save the file and that's it, your Joomla will now connect to the correct database has
Check the changes made
In the Joomla interface, it is possible to check the paths of the /logs and /tmp folders:
- for the /logs folder: go to System / Configuration then System
- for the /tmp folder: go to System / Configuration then Server
Link to this FAQ: