Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Joomla: updating the login information for a MySQL database
Following a plan change for your site (migrating from the old v1 60 GB plan to the latest v2 100 GB hosting plan) you my have to update the connection between the MySQL database and your Joomla site (in order to avoid the "Database connection error: could not connect to mysql", for example).
Items to be changed
Here is the information to be changed in the configuration.php file so that your Joomla site will work (as a general rule, a prefix has simply been added before the existing database name and username):
- The MySQL database name (e.g. databasename before, abcd_dbname after)
- The MySQL database host server (e.g. mysql.yourdomain.ch before, abcd.myd.infomaniak.com after)
- The username accessing the MySQL database (e.g. dbuser before, abcd_dbuser after)
- The path of the two following directories: /tmp and /logs
Editing the configuration.php file for Joomla
- Open the Manager (manager. infomaniak.com)
- Go to Web hosting
- Click the hosting/domain name concerned
- Under Sites, click the site concerned
- Click the Advanced Settings button
- Under PHP, click PHP Information
- On the _SERVER['DOCUMENT_ROOT'] line, copy the path on the right
- Click Databases in the left side menu
- Find and keep your current MySQL information based on the above list (help: https://faq.infomaniak.com/1981)
- Click FTP/SSH in the left side menu
- Create a FTP account: https://faq.infomaniak. com/1982
- Log in to FTP: https://faq.infomaniak.com/1130
- Edit the configuration.php file in the root folder of your Joomla
- Find the paragraph concerned and update the 4 pieces of information (according to the above list)
- Don't forget to replace the old path (including "www") with the new path:
- Save the file and you're done. Your Joomla will now connect to the right database
a
Checking the changes made
You can check the /logs and /tmp folder paths in the Joomla interface:
- for the /logs folder: go to System / Configuration then System
- for the /tmp folder: go to System / Configuration then Server
Link to this FAQ: