Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Installation and Configuration

Mambo Manual is part of the documentation project for the Mambo open source content management system

Toggle Sidebar

How to Apply SQL Upgrades using phpMyAdmin


Login to phpMyAdmin

If your host has provided cPanel you can access phpMyAdmin by logging into your cPanel on your server and locating the "MySQL Databases" icon. Click on this icon then scroll down to the bottom of the page where you will find a link to phpMyAdmin. Click on the link to login directly to the phpMyAdmin database management interface.

See Accessing phpMyAdmin for more details.

Backup Your Database

Before you do ANYTHING with your database always do a backup first.  Then, if anything goes wrong you can roll back to your saved database. 

See Backing up & Restoring the Database

Running SQL Queries using phpMyAdmin


  Once you have logged into phpMyAdmin the left hand side of the screen will look something like the screenshot here.  If you have more than one database you will need to select your Mambo database from the dropdown list.

 This should then display the database you use with Mambo.  The left side will show a list of all the tables within your Mambo database and the main part of the screen will show the table structure.

Across the top of the database display area you will see a navigation bar that looks similar to this:


       Select the SQL tab.
 
 

 
 
         The screen will now look something like this. 


In the Mambo patch file you have downloaded you will find a directory called "Upgrades".  Within that directory are one or more SQL files that contain the queries that are necessary for upgrading your database.  For this example, I will use the Mambo 4.6.3 to 4.6.4 patch and show you how to run this SQL query. 

Open the file called 463_to_464_upgrade.sql in a text editor.  

The file contains one line: 

INSERT INTO `#__components` VALUES (null,'mostlyce_frontend','',0,0,'','','com_mostlyce_frontend',0,'',0,'');

SQL queries must always be edited to reflect the database table prefix you chose when you installed Mambo.  Mambo allows users to chose whatever table prefix they like (including no prefix at all if you wish) and this makes it impossible for the team to provide a "one size fits all" SQL query, since every database is potentially different.

The default table prefix is mos_  so if you did not change your database table prefix your database will be using mos_ in front of the names of each table in your database. In this example, I am using mos_.  Scroll up and look at the first screenshot on this page - see how each table is prefixed with mos_?

Note, the prefix contains one underscore.  In the upgrade SQL files within Mambo the prefix name is represented by a hash symbol (#) and two underscores  - this is the part that we edit and replace with our own prefix.
 
 

 


So, enter your edited SQL query into the field within phpMyAdmin, as shown above.

At the bottom of this query box you will see a button that says, "Go".  Once your query has been entered, click on "Go" and phpMyAdmin will run the query.  This updates the database.

If all goes well, your database will now be upgraded to the latest version of Mambo.

Toggle Sidebar
Space Navigation
Added by Lynne Pope on 04 Jul, 2008 11:07, last edited by Lynne Pope on 17 Sep, 2008 13:45

Adaptavist Theme Builder Powered by Atlassian Confluence
Free theme builder license