Chapter 6. Database settings

Talk to your database

Ok, let's see if the information you provided about your database is correct. The first screen you'll see just repeats what you entered in the General Configuration (Chapter 4, General configuration screen. This is it:

You have another chance to take a look at what you entered.

Figure 6.1. You have another chance to take a look at what you entered.

If all data are correct, push the button labeled Next and the wizard will attempt to do two things: first, it'll try to connect to the database server, that is, it's check to see if MySQL is active and running. It'll then try to connect to the database whose name you defined. You've already seen the screen displayed if for some reason the MySQL server is not available, its in Figure 4.2, “If you can't connect to the MySQL server, you'll see this ugly message.”. So, although this is stating something a bit obvious, please be sure you have MySQL active while installing XOOPS.

Assuming your MySQL server is correctly setup, the wizard tries to access the database, in this case the one called test. What happens now? It depends. If you're installing locally, you probably haven't created the database just yet. In that case, you'll be facing a screen with a single red light on:

This is not a real error if you're installing locally. Just go ahead.

Figure 6.2. This is not a real error if you're installing locally. Just go ahead.

XOOPS didn't find a database on the server, for the simple reason there's still no database there. So of course you should attempt to create it. The attempt, by the way, will put to test your data about the database user and password. So click on Next.

Wham! Everything was ok so you now have a blank database installed.

Figure 6.3. Wham! Everything was ok so you now have a blank database installed.

This terse screen just gives you feedback: yes, you now have a blank database called test in your server. So you click again on the omnipresent button labeled Next. This is what you want to see:

You are ready to install the tables that create your XOOPS site.

Figure 6.4. You are ready to install the tables that create your XOOPS site.

If you see any red light, something is wrong. Either your MySQL is not accessible or the user/password combination you entered doesn't have the rights over that specific database. But must probably you'll see this screen with two green lights. This means you have a clear path and are ready to write your tables.

By the way, if you are installing into a remote hosted server, you won't see the bit about creating a table, since you already had done that. The most probable outcome is that you'll jump directly to the screen shown in Figure 6.4, “You are ready to install the tables that create your XOOPS site.”. So don't hesitate and go ahead: click on Next.

A lot happened here. You now have a table-populated database.

Figure 6.5. A lot happened here. You now have a table-populated database.

This screen is very informative, because it gives you a still portrait of the tables that comprise your XOOPS site. Let's see what can we tell about what XOOPS just did.

The first thing to notice is that a blank, brand new XOOPS site has 31 tables defined. I'll attempt a definition of what these tables contain, so you can begin to grasp a bit about XOOPS power. Let's see...

These are all blank tables, ready to be populated. You must know that in a very short time, this list will grow. Why? Because the default installation of XOOPS just sets up for you one module: the System module. From here, you must install whatever modules you want your site to have... but I'm running ahead. We still haven't finished installing XOOPS.

So, let's continue. If you don't see all these green lights, you'd probably start be best starting over, because there won't be tables on your database. Then again, if you're very knowledgeable about MySQL, you may be able to set the tables manually, by importing into your database the script install/sql/mysql.structure.sql. But let's hope you don't need to do this. If you already have the battery of green lights, get set, because now you need to... click on the button labeled Next. So what else is new? Ah, of course. Let's go to Chapter 7, Admin settings