How does MyBB install its database onto my server? I have my own users.sql database, but i have it as a file, instead of it actually being on the server, but i want to actually make it so that i can install it onto there, instead of creating it in phpmyadmin on the server... So how would i go about doing this???
It's quite simple really - MyBB stores the database structure (tables/columns) in a file called (dbms)_db_tables.php which is located in ./install/resources/.
During the install process, it opens this file - reads the array of tables that are here - and runs each of them as a query using the database's handler (inc/db_(dbms).php, basically PHP's mysql_query). Of course, dbms being database management system - it runs specific files depending on what database type you selected at the start of the install process.
There's obviously more witchcraft that happens, such as opening a connection to the database etc. etc. but that's the bare bones of the install process.
Ahhh, i see what you mean It doesn't look too hard i guess... Though i dont really get the installer part of MyBB...Like how it writes those queries into a database that is then stored on ther server :/
Well during the install process, it asks for the database details - such as address, user and password. You can install the database on any server that has those permissions, but typically it's on localhost.
Ok, thanks Tom. So if i actually do manage to do something like this (which maybe within the next week or so...), then do i still access it the same way, with the mysql_connect($servername, $username, $password)?