Discus Home Page | Knowledge Center | Administration Instructions |
|
Database Manager - Administration Interface The Database Manager interface is divided into five 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 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 four 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 watched for this prefix (alphanumeric characters) and he 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 table given, check the box next to each table that you would like to initialize. Any tables that it not ready been initialize will be checked by default.Within the table, 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 a table or 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 and it is a bad thing. To initialize the table or tables, you must click the "OK" button. Once you initialize your tables, a success message will appear indicating the table 7 initialize, in the status of your tables should 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 (if you're using the database and you were to import data from text files into the database, is very likely that incomplete information would be imported). You can import data from text files into the database only when the database table has 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. Comments: Importing your counters will automatically add 100 to each of the counters. This is to further reduce the possibility of having two items with the same "unique" number. Since your counters are used to assign a unique identification number better not used in any way for statistical purposes, you should not be concerned about this addition. 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 (if you're using text files and you were to export data from database into the text files, is very likely that incomplete information would be exported). 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. Comments: Exporting your counters will automatically add 100 to each of the counters. This is to further reduce the possibility of having two items with the same "unique" number. Since your counters are used to assign a unique identification number better not used in any way for statistical purposes, you should not be concerned about this addition. 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, selected desire 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: If your new database setting makes it impossible for you to log into your board, you will not be able to change the database setting again your administration program. Instead, you'll need to edit your options.txt file manually.
You can avoid this situation described above by always remembering to import your data from text files to the database before toggling the database on, and exporting your data from the database to text files before toggling the database off. Copyright © 2002, DiscusWare, LLC, all rights reserved |
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.