You may occasionally need to know the name of the database used for Simple Machines Forum (SMF) installation, e.g., perhaps while troubleshooting a problem or if you need to modify an entry in a table or remove all of the tables for the forum with phpMyAdmin. To identify the database, in the directory where the forum files are stored, look for
Settings.php
. Look for the "Database Info"
section in the file:########## Database Info ########## $db_type = 'mysql'; $db_server = 'localhost'; $db_name = 'jane_smf'; $db_user = 'jane'; $db_passwd = 'ASecretPwd'; $ssi_db_user = ''; $ssi_db_passwd = ''; $db_prefix = 'janeswebsite_'; $db_persist = 0; $db_error_send = 0;
In the above example, I can see that the database name is jane_smf
and that the userid for access to the database through
MySQL or
MariaDB is
jane
with a password of ASecretPwd
. Within the
jane_smf
database, the tables for her forum begin with
janeswebsite_
. One database could be used for multiple forums
with the tables for each beginning with a specific database prefix.
If you do need to remove all of the tables beginning with a specific prefix from a database, e.g., in the case where a database is used for multiple forums, you can use the instructions at Dropping tables with a similar prefix from a MySQL database to remove just those for a specific forum.