It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

I need sql dump conversion help!

Moderator: Malcolm

I need sql dump conversion help!

Postby hoxxy on Wed Jan 23, 2008 8:42 am

I am currently modding a open source forum with will be offered to the public, problem is I know nothing about sql but need to convert the sql dump file to a installable sql through an install page ie install.php, rather than getting people to install script and then add the dump sql through phpadmin..........

How do I go about doing this?

Is there any programs that can do it?

Can anyone sort this for me?
hoxxy
 
Posts: 11
Joined: Wed Jan 23, 2008 8:30 am
Location: UK

Re: I need sql dump conversion help!

Postby leonard on Wed Jan 23, 2008 9:19 am

hoxxy wrote:problem is I know nothing about sql but need to convert the sql dump file to a installable sql through an install page ie install.php


A MySQL dump IS installable, at least in the sense of it being a plain SQL-file which can be executed.
Depending on which mode it was exported, you simply need to import it with the correct user. Maybe you need to create the database first.
Code: Select all
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `myNewDB` /*!40100 DEFAULT CHARACTER SET latin1 */;


cheers!
- leonard
:%s/^M//
There are 10 kinds of people:
Those who understand binary and those who don't.
User avatar
leonard
100+ Club
 
Posts: 147
Joined: Tue Dec 18, 2007 7:11 am
Location: Switzerland

Re: I need sql dump conversion help!

Postby hoxxy on Wed Jan 23, 2008 11:12 am

Database is set up when I say I know nothing of sql I know the very basics ie how to import/export set up database (from Cpanel).

Where should I put this:
Code: Select all
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `myNewDB` /*!40100 DEFAULT CHARACTER SET latin1 */;
hoxxy
 
Posts: 11
Joined: Wed Jan 23, 2008 8:30 am
Location: UK

Postby leonard on Wed Jan 23, 2008 1:39 pm

The SQL-statement was to create a database, but I dont know if that is your problem.

need to convert the sql dump file to a installable sql through an install page ie install.php
What do you mean with this?

cheers!
- leonard
:%s/^M//
There are 10 kinds of people:
Those who understand binary and those who don't.
User avatar
leonard
100+ Club
 
Posts: 147
Joined: Tue Dec 18, 2007 7:11 am
Location: Switzerland

Postby hoxxy on Wed Jan 23, 2008 3:43 pm

Like with most forums using sql databases they have an install folder containing schema files etc, I want to have this but with only the sql file and install/import.php page so people would goto install.php enter there details.....DB name, user name, P/W etc click on install and it would install the sql file to the database.
hoxxy
 
Posts: 11
Joined: Wed Jan 23, 2008 8:30 am
Location: UK

Postby leonard on Thu Jan 24, 2008 3:02 pm

OK, if I understand you correctly, you are in the following situation:

What you have:
- a SQL-dump file of a forum (exported from a working forum where you have access to the database)
- the software-code (PHP) of the original forum.

What you want:
- modify the the original software code to have a more user-friendly install-page and use the exported SQL-dump as base for the installation.


Well, there is no definite answer to your question, because it all depends on the prerequisites of the forum-software and the exact contents of your SQL-dump file. Basically you can use the SQL file as template and substitute all the dynamic stuff needed for the installation.
For this, there is almost no way around learning SQL, because normally software, such as a PHP-forum also needs initial-data and uses table-prefixes etc., which would be statically in your SQL-dump.

cheers
- leonard
:%s/^M//
There are 10 kinds of people:
Those who understand binary and those who don't.
User avatar
leonard
100+ Club
 
Posts: 147
Joined: Tue Dec 18, 2007 7:11 am
Location: Switzerland


Who is online

Users browsing this forum: No registered users and 0 guests