|
The Database Manager interface is divided into six sections. The Setup tab allows you to specify the database name in the other parameters used to
connect to your database. The Initialize tab allows you to initialize a new database so it can store Discus data. The Import tab allows you to import
data from text files into your database. The Export tab allows you to export data from your database into text files. The Toggle tab allows you to choose
your data storage method, be it the database or flat text files. The Stats tab reports your MySQL version, and on some systems, additional information
about the tables in your database. The following instructions detail what each of these tabs does.
Setup tab
The Setup tab allows you to specify the parameters needed to connect your database. There are five boxes on this interface, which are explained as
follows:
Database Name: This is the name of the MySQL database to which you'll be connecting. If you run your own server and you created a database
according to our instructions, the database name will be the same as database_name. If you are
hosted on a web host who gives you one database for your account, the database name in this step will be the same as the database name that you use in
all of your other scripts and applications. If you're not sure what to use for your database name, ask your web host, as presumably they are the ones
who set up your database for you.
Username: This is the username that you use to connect to the database. Most database connections will use a username to identify you and
establish your permissions. This username will likely be the same one that he used to connect to databases in your other scripts and applications. If
you're not sure what username to use, ask your web host. If you don't need to a username, leave this text box blank.
Password: This is the password that goes along with the username from the previous box. If you do not need to use a password, leave this box
blank.
Optional Prefix: All database tables created by your discus board will be given the prefix that you specify here. This allows you to use a
single database to store the data from multiple discus boards as well as the data from the rest of your website. You may use whatever you want for this
prefix (alphanumeric characters) - you should use a different prefix for each discussion board. We recommend using an abbreviation for your board title
that will be easily recognized by you in the future.
Optional Socket: This allows you to override the default MySQL socket that was determined when the DBD::mysql module was installed. If the
module was installed incorrectly, the default socket of "/tmp/mysql.sock" may not exist on your server. If you need to use another path, such as
/var/lib/mysql/mysql.sock, you can enter it here. You will need to use this setting only if you receive the error message Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) when setting up the database. Your web host will be able to
tell you what the path to the MySQL socket is. Leaving this box blank uses the default socket, which will work on almost every server.
When you have specified all of the needed parameters, click the "Save Parameters" button. The screen should refresh with a notice that your database
parameters were saved. If, using your database parameters, a successful connection was initiated with the database, you'll see text indicating that the
connection is active. If you see this, proceed to the next step of initializing your database tables. If you see an error message indicating that a
connection could not be made, you'll need to change your parameters. Your web host should be able to provide support regarding the creation of new
databases or users.
Is your MySQL database on a remote server? If so, consult our unusual setups page to learn how to
set up a connection to a MySQL database on a server other than the one that hosts your web site.
Initialize tab
Initializing your database means that the database tables (containing your users, moderators, counters, a file locks, and so on) will be created, and
that any data already existing in these tables will be wiped out. In other words, initializing your database starts the database over from scratch.
Therefore, initializing the database is a step that you should do only when you are first beginning to use the database. You should not have a reason to
initialize the database more than one time.
From the list of tables given, check the box next to each table that you would like to initialize. Any tables that have not already been initialized
will be checked by default. Within the list of tables, you'll also see an indication of the status of the table (ready or not initialized) and the number
of rows of data contained in each table. Remember, initializing a table will delete and reset all data from that table. Therefore, think very carefully
before you choose to initialize a table.
When you've chosen tables that you wish to initialize, click the "Initialize Selected Tables" button. A confirmation dialog box will pop up, reminding
you that initializing the table with data in it is a bad thing. To initialize the tables, you must click the "OK" button.
Once you initialize your tables, a success message will appear indicating the tables have been initialized, and the status of your tables will
indicate that they're ready for data. After initialization, the "counters" table should have two rows, and any other freshly initialized tables should
have zero rows.
Import tab
"Importing" data takes data from the text files and puts it into your database. Importing data is allowable only if you're currently using text files
to supply the data for your discussion board.
You can import data from text files into the database only when the database table has already been initialized. You cannot import data into the
database if the table has not been initialized, or if the table already contains data.
To import data, check the box next to each table that you wish to import. Then, click the "Import Selected Data" button. This process will result in a
progress meter being displayed. Importing your data may take several minutes depending and the size of your board.
Export tab
"Exporting" data takes data from the database and put it into text files. Exporting data is allowable only if you're currently using the database to
supply the data for your discussion board.
You can export data only from tables that already exist. To export data, check the box next to each table that you wish to export. Then, click the
"Export Selected Data" button. This process may result in a progress meter being displayed. Exporting your data may take several minutes depending and
the size of your board.
Toggle tab
The Toggle tab allows you to select the data source for your board. There are two choices available to you: text files or the database. Before
toggling your data source, it is very strongly recommended that you import or export the data from your current data source into the new data source.
This will ensure a seamless transition between your data sources.
To change the data source, selecte the desired data source from the drop-down list box and click the "Save Database Setting" button. Assuming that you
have followed our suggestion and imported or exported your data immediately before toggling the database on or off, you should be able to continue with
administration with no problem.
|
Comments:
Initializing your counters automatically creates two rows within the counters table. The first row is used to store the page counter (data.txt) and the second row is used to store the post counter (postindex.txt). This is why initializing your counters will always result in having two rows in the counter table, whereas initializing all other tables results in having zero rows in the initialized tables.