MyBB database's

← General Stuff — Started 21 Apr, 2011

c3f3 Admin
21 Apr, 2011, 8:35 am (This post was last modified: 21 Apr, 2011 8:35 am by c3f3 Admin.)
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???
[Image: 1_15_01_11_6_52_28.png]
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.
c3f3 Admin
21 Apr, 2011, 8:56 am (This post was last modified: 21 Apr, 2011 9:01 am by c3f3 Admin.)
Ahhh, i see what you mean Tongue 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 :/
[Image: 1_15_01_11_6_52_28.png]
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.
c3f3 Admin
21 Apr, 2011, 1:52 pm (This post was last modified: 21 Apr, 2011 1:52 pm by c3f3 Admin.)
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)?
[Image: 1_15_01_11_6_52_28.png]

User(s) browsing this thread: 2 Guest(s)