Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Solve a cut between Joomla and MySQL
This guide concerns users who make changes around an Infomaniak hosting on which Joomla is installed.
Preamble
- If you had to update the connection between the MySQL database and your Joomla site (to avoid error "
Database connection error: could not connect to mysql
" e.g.) then this procedure details how to proceed. - Often it is a matter of prefix which was simply added in front of the existing database name and username.
Elements to be amended
Here is the information to adapt in the file configuration.php
for your Joomla site to work:
- the name of the MySQL database (e.g.
bddname
before,abcd_bddname
after) - the host server of the MySQL database (e.g.
mysql.domain.xyz
before,abcd.myd.infomaniak.com
after) - the username that accesses the MySQL database (e.g.
userbdd
before,abcd_userbdd
after) - the path of the following two directories:
/tmp
and/logs
Edit File configuration.php of Joomla
To this end:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on the button Advanced Parameters.
- Under the tab PHP click on PHP information.
- On the line _SERVING['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 above list (help: https://faq.infomaniak.com/1981).
- In the left side menu, click on FTP/SSH.
- Create an FTP account: https://faq.infomaniak.com/1982
- Log in via FTP: https://faq.infomaniak.com/1130
- Edit file configuration.php which is in the root folder of your Joomla.
- Find the relevant paragraph and update the 4 information (according to the list above).
- Don't forget to replace the old way (including "
www
") by the new way:
- Save the file and that's it, your Joomla will now connect to the correct database!
a
Check for changes made
In the Joomla interface, it is possible to check folder paths /logs
and /tmp
:
- For the folder
/logs
: Go under System / Configuration then System - For the folder
/tmp
: Go under System / Configuration then Server
Link to this FAQ: