Jul 24, 2008

How Do You Combine Multiple Mysql Databases Into One Database?

Free Web Hosting, No Ads > CONTRIBUTE > The Internet > Web Design

free web hosting

How Do You Combine Multiple Mysql Databases Into One Database?

owbussey2
How do you combine multiple mysql databases into one database? I was thinking thta soem servers restrict you to one to five mysql databases. If I have a dynamic part of a table on my site, I would use one database for that. For every table of dynamic information, I use one database. Can I streamline what I am doing and combine all of my databases into one? I could make multipple tables in the same database. Would that work?
thanks

Reply

blendergalactica
The most common method, and many well coded apps support this, is table prefixes. So let's say you have xoops. All the tables would be xoops_news, xoops_conent, xoops_banners, etc.

Then let's say you want to have Promisance game engine.

Then those tables could be prom1_game, prom1_news.

Let's say you want a second Promisance game engine:

Prom2_game, prom2_news

let's say you want to include phpbb...

phpbb_news, phpbb_members

so on and so forth. I used to have to do this back in the day when you only got 1 MySQL database with your hosting accounts.

Reply

jlhaslip
Exactly.
The trouble with that is the need to re-code your queries and such in all of your scripts, but it is do-able, yes.
It would be preferred to have seperate databases for each "function" to make the code portable and to allow for "modularization", but if the larger restriction is the number of databases allowed on the account, then it would win the battle.
SQLite DBMS is available through php. Might want to check to see if that could be used to augment the D/b count. MySql and SQLite are 'similar', but not the same. Have a look at the php Manual for information about SQLite.
Or are there some uses that might be able to use 'flat-files' instead of Databases? Using a flat-file to store information which doesn't change too often or isn't used much might be one way to reduce your D/b count.
As to the 'how-to-do-this' aspect of combining the data tables into a single database, have a look at the phpadmin software. It does amazing stuff.

Reply

fffanatics
That is the only way to do it and if you wrote the code correctly to begin with, you would have made a new table for each new set of data you have rather than a new database. A database should be the same for everysite so that if you ever want to export it or even distribute it as a template, all the other person has to do is import the 1 table and everything will work. Plus it keeps your databases clean and easy to use if you host more than one site on the same account and both use a database. Then you dont have to worry about name conflicts and finding the right tables. All you do is go to the correct db and then change the right table.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. mysql combine selects - 2.05 hr back. (1)
  2. how to combine multiplt table in sql? - 10.93 hr back. (1)
  3. how do you combine two photes into one? - 100.03 hr back. (1)
Similar Topics

Keywords : combine, multiple, mysql, databases, database

  1. Need Help With My Database
    retrive data as a link (4)
  2. Mysql
    Several files in one field. (2)
    Hi guys. I want t know if it is posible to have so many entries for one object in a field in MySQL.
    I know my question may not be clear because I lack in terminology but pliz try and help. What I want
    to do is for axample have a database of my clients with the following fields for every client:
    fname, lname, more than one photos, contrubutions(comments, jokes, testimonials posted) etc. I want
    to have the things like the photos in the same field but they have to be unique so that my php code
    can deal with them individually llike they are coming from different fields.....
  3. Multiple Page Titles
    Multiple Page Titles (1)
    A really cool script. It allows you to put up to 6 page titles for one page and everytime you
    refresh the page it alternates the title... It might help increase your Google Page rank I hope you
    will like it. "Massive Respect" /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
    alt="smile.gif" /> /wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
    <script LANGUAGE="JavaScript"> var numb = 5 title_text = new Array(); title_text = "Your
    Site Name here - Discription here"; title_text = "Your Site Name here - Discription ....
  4. Index In A Mysql Database
    Make the numbers follow (3)
    I hope I am on topic here (It does have to do with web design, after all). I have noticed that in a
    MySQL database, the 'id' field just keeps its numbers for every record, with the backdraw
    that, whenever you remove (a) record(s) from the table, you get your list numbered as eg.
    1,5,6,7,12,25 etc. This makes it a bit difficult of keeping track of the number of records in your
    table. Is there a way of achieving (either in PHPMyAdmin or through the use of PHP) that the id
    field in your table gets sort of 'refreshed and updated' so you have a clearer view....
  5. Multiple Forum Skins
    To have, or not to have? (6)
    Hey all, I'm just starting up a forum on my hosting here, and I was wondering, how do people
    here feel about having multiple skins? I think just having the default skins that come with the
    forum and maybe one or two added on that match the style of the forum a little better, but what do
    you think? Should I have a dark/light added on, in addition to the default skins? and should I
    leave the forum default as one of the included skins? or something that fits in with my idea of what
    the forum looks like a little better? thanks for your opinions /smile.gif" style="vert....
  6. Treating .csv Files As Database Data
    Showing .CSV data on a web page (2)
    I use a nice program (which I helped to beta test) called ' Simfatic Forms ' to generate
    forms on web pages. The only problem is that it does not (yet) support MySQL databases, it saves the
    form data as a .CSV file. Now I was wondering if you can do the same with a .CSV file as you do
    with a MySQL databse, ie. displaying the data in that file on a web page which adjusts automatically
    as data are added to the file. To clarify: eg. if I make a form to sign a petition online, the data
    are saved to a .CSV file every time someone fills in the form, is it now possibl....
  7. Mysql + Php Question
    (5)
    Hi, I am creating a website in php and using a mysql database to store the data. I want to store
    time data in the database. My question is what is the best datatype I should use and how do I read
    the time from the database and format(display) it using php ?....
  8. Accessing Mysql From Javascript
    Javascript to communicate with database (4)
    I found a nice program which allows you to put quizzes on your web site. You can design your own
    questions, set the layout of your page, and there is also a possibility of having the results
    emailed to you. It further offers a facility to store the results and all that, all you have to do
    is put a link in the program, telling it which page takes care of that. However, when I look at the
    HTML code the program generates, I see that most of it is written in Javascript. Obviously, it also
    uses variable names, but as I don't know any Java, I was wondering if those variab....
  9. Databases On The Net
    (2)
    HI,, I am about to attempt my first database project. I want to create a small community that is
    similar to a myspace application but there will not be more them maybe a hundred friends in it. I am
    trying to figure this out. I would need to create a database for this. A few questions. 1. there
    will be a login becuase it will be members only, is this a completely seperate database or should
    the database be one whole unit. 2. there will be a place for a picture, a few songs, a couple links
    to different websites that they like, maybe a short video, ....this should all be i....
  10. Another Question On Mysql Table Data Type
    text field for lots of text. (1)
    In my MySQL table I would like to use one text field which can contain lots of text. What I want to
    use it for is for student records, and I want to be able to add to it without destroying what is
    already there. I want the field to contain something like: ****03/11/2007**** Chopin prelude No 9:
    small problem bars 12-15. Advice given on how to practice. ****10/11/2007**** Problem in Prelude
    overcome, piece successfully completed. New piece set: Beethoven Sonata No 1, movement 1. etc. This
    is of course just an example, but that is how I want to set up my student records....
  11. Which Data Type To Use In Mysql Table
    Using a 5 character number (4)
    If I wanted to use an ID field which automatically increments when data are addad, but displays the
    ID as a 5 figure number, which data type would I have to use? I would want a type that assigns a
    number to a record in the format "00001", "00002", etc. However, when I use "int" as datatype, it
    only displays th field contents as "1", "2" etc. So, which data type could do the job for me? i do
    not need a decimal point or anything, just an id that displays in 5 figures, including the leading
    zeros. Thanks in advance.....
  12. Where Am I Going Wrong This Time?
    Can't enter data into database (4)
    Hi, on my local machine (with Apache 2.0, PHP 5.2.4 and MySQL 5.0) I come across weird things. I
    have successfully made a table, but when I try to enter data into it it just will not accept the
    empty string for the first field (id). This was the creation line: QUOTE $query="CREATE
    TABLE members (id int(20) auto_increment,first varchar(15) NOT NULL,last varchar(15) NOT NULL,phone
    varchar(20) NOT NULL,mobile varchar(20) NOT NULL,fax varchar(20) NOT NULL,email varchar(30) NOT
    NULL,web varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))"; This has....
  13. Programming For Multiple Browsers.
    What do you think is the best way? (5)
    Hey what do you think is the best way to code a site to appear correctly on multiple browsers?
    I've been thinking about useing Javascript or think of something in PHP. Also would it be
    better for me to use a style sheet or the include or require function in PHP to increase speed for
    when I have to update my site? I know how to do these things I'm just wondering wich way is the
    most effective and the fastest.....
  14. Help With Database
    (24)
    I know I might sound a bit novice, but I'd like to know how to make a register and login
    database. I'm making a serious website for the very first time and I can't find on internet
    how to make one (don't even know how it is named). I would really appreciate me if someone could
    link me to a tutorial or give me the explanation, also the program to use (I think Microsoft Access
    is good?)....
  15. Merging Database Php Mysql
    (5)
    Hii i need help margning script. i have coppermine gallery, AzDGDating Site, Noah's
    Classifieds they all have user sign-up login. but they have different like i need to have 3 seperate
    account for each script is there any way like mergning one user name and password would work for 3
    section. if you don't get my question please tell me i will try to explain more in detail
    thank you for your time and help ....
  16. Help Or Advise Needed For Access Database Webpage Conversions
    I need some help with getting a linked webform so that the data can be (0)
    Hello All. I'm looking for some advise or assistance with getting a web page/access page
    running so that i can have the page online and collect the data live into my database for Project
    Management... Currently I'm developing a database using M$ Access, and need to have staff
    data enter sales information directly into a web form that can be linked to a database? I've
    looked at using a M$ Front page web form with data collected into a .CSV text file and
    extracting the data but i need to be able to let the staff review and update the data for eac....
  17. Wordpress Databases And Privileges
    My friend wanted to install wordpress on his server (not on trap17.com (2)
    My friend wanted to install wordpress on his server (not on trap17.com) and he has phpmyadmin 2.6.0
    and dosnt have the ability to make privliges /blink.gif" style="vertical-align:middle"
    emoid=":blink:" border="0" alt="blink.gif" />.How would he set up wordpress without the ability to
    set privliges? If you had any suggestions (like step by step directions /tongue.gif"
    style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />) that would help alot.
    Thankyou,
    ....
  18. Phpbb And Mysql Relations?
    Need forum code for my website (2)
    Hi if someone could get back to me as fast as they can that would be great! i got a couple of
    questions what do you use my sql for what does that have to do with forums? and secondally can
    someone give me the php code for the forum thanks /biggrin.gif" style="vertical-align:middle"
    emoid=":D" border="0" alt="biggrin.gif" />....
  19. Syndicate Your Content Using Php And Mysql
    (0)
    I just finished reading a php book, and figured out some interesting things, and wanted to share
    them with the Trap17 community. I know lot of you make websites so this could help out. Enjoy
    QUOTE Introduction So, you've spent the best part of a year creating your PHP/MySQL driven
    web site. You've got a fair amount of decent, flexible content, and you're buddies with a
    couple of other webmasters, so they've given you a free banner ad on their site in exchange for
    one on yours. Promoting your site can be even harder than developing it. I've foun....
  20. Tips On Creating Your Own Search
    PHP/MySQL Integrated search on your site (1)
    I'm not a professional web developer but I've learned a lot since I used Macromedia
    Dreamweaver. The latest version 8 supports PHP 5. If you select PHP as your working language, you
    can use this software to automatically add dynamic content to your website with MySQL as a
    requisite. If you have a MySQL database containing records like a songs information database, then
    you might probably not be able to add a good search page to your website which will search records
    in the database. I faced the same problem, but now I'm able to create one sophisticated datab....
  21. Php And Mysql Problem
    Need a little help (8)
    hi.. i'm new in php and mysql... here is my problem.... $sql = "SELECT COUNT(*) FROM
    messages WHERE _parent={$row }"; after sending the query above i dont know how to fetch the
    actual rows counted.. i tried using the mysql_fetch_array() and mysql_fetch_row() function but it
    didnt work... actually the only function i know that fetches results from sql queries is
    mysql_fetch_array()... so what function or code i need to have the result from the query which uses
    COUNT?....
  22. Import From Excel File Into Mysql Database
    (7)
    Has anyone tried using the excel import function that comes with phpmyadmin
    http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
    is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
    to import the data to , there is a link on the bottom left corner which says "insert data from a
    text file into the table" - although it says text file it still can be used to import an excel file.
    When you click on this link you will be taken to a page where you will be asked for the file name
    (the....
  23. Mysql Host Adress
    how do i connect (4)
    helo! hou do you? i need somebody post the data for acces my mysql database from my client.
    thanks a lot! also i need the alter code for add a foreign key to a column on a table, thanks a
    lot /blink.gif' border='0' style='vertical-align:middle' alt='blink.gif' /> Moved to the
    appropriate section. Don't put questions in the tutorial section please. ....
  24. Best Multiple Users Scripting Tool?
    Newspro? Movable Type? (1)
    What is the best multiple users scripting tool that is free? I'm not quite sure if Movable type
    is free. More specifically, I would like to know one that I could use for this website.....
  25. Free Dhtml Menu That Reads A Database
    Anyone know one? (7)
    Hey, anybody know a DHTML menu that reads info from a database? for people who don't know, just
    like windows' "start menu" with the popup menus I want to mod it so that in phpnuke I can edit
    it admin panel end. I would like it to be vertical. Do not use note tags because they are only for
    admins and moderators. ....
  26. What If You Forget Mysql Root Password
    (2)
    If you have set a root password, but forgot what it was, you can set a new password with the
    following procedure: 1. Take down the mysqld server by sending a kill (not kill-9) to the mysqld
    server. The pid is stored in a `.pid' file, which is normally in the MySQL database directory:
    shell> kill `cat /mysql-data-directory/hostname.pid` You must be either the Unix root user or the
    same user mysqld runs as to do this. 2. Restart mysqld with the --skip-grant-tables option. 3. Set
    a new password with the mysqladmin password command: shell> mysqladmin -u root password &....
  27. Mysql And Ms Access
    (1)
    Can MS Access interface with mySQL? Does anyone know how to set it up? Is it even a good idea to?....
  28. Mysql Tool
    (0)
    What are the best Open Source MySql developer tools?....
  29. Mysql Infos
    (2)
    hello... what are the infos for the mysql databases ? Like the host, is it localhost ? and the
    username ? And what does setting up users for the databases in cpanel does ? thanks in advance....
  30. Php Tutorial - Basics...up To Mysql/file Commands
    (1)
    the best way to start php is probably not adjusting a script IMO - that misses out a stage. - the
    very first stage - here... Why use php? because it allows things to be generated very quickly -
    without lots of html pages. It enables users you choose to allow, to input their own content to the
    pages you want them to. 1) save these files as anyfilename.php - pick your names, upload them to a
    php enabled server and go to the url they are at... 2) understand , .php, //////, /* */, and ;
    Code: ?> THis tells the web browser when to expect php coding. So... wh....

    1. Looking for combine, multiple, mysql, databases, database

Searching Video's for combine, multiple, mysql, databases, database
Similar
Need Help
With My
Database -
retrive data
as a link
Mysql -
Several
files in one
field.
Multiple
Page Titles
- Multiple
Page Titles
Index In A
Mysql
Database -
Make the
numbers
follow
Multiple
Forum Skins
- To have,
or not to
have?
Treating
.csv Files
As Database
Data -
Showing .CSV
data on a
web page
Mysql + Php
Question
Accessing
Mysql From
Javascript -
Javascript
to
communicate
with
database
Databases On
The Net
Another
Question On
Mysql Table
Data Type -
text field
for lots of
text.
Which Data
Type To Use
In Mysql
Table -
Using a 5
character
number
Where Am I
Going Wrong
This Time? -
Can't
enter data
into
database
Programming
For Multiple
Browsers. -
What do you
think is the
best way?
Help With
Database
Merging
Database Php
Mysql
Help Or
Advise
Needed For
Access
Database
Webpage
Conversions
- I need
some help
with getting
a linked
webform so
that the
data can be
Wordpress
Databases
And
Privileges -
My friend
wanted to
install
wordpress on
his server
(not on
trap17.com
Phpbb And
Mysql
Relations? -
Need forum
code for my
website
Syndicate
Your Content
Using Php
And Mysql
Tips On
Creating
Your Own
Search -
PHP/MySQL
Integrated
search on
your site
Php And
Mysql
Problem -
Need a
little help
Import From
Excel File
Into Mysql
Database
Mysql Host
Adress - how
do i connect
Best
Multiple
Users
Scripting
Tool? -
Newspro?
Movable
Type?
Free Dhtml
Menu That
Reads A
Database -
Anyone know
one?
What If You
Forget Mysql
Root
Password
Mysql And Ms
Access
Mysql Tool
Mysql Infos
Php Tutorial
-
Basics...up
To
Mysql/file
Commands
advertisement



How Do You Combine Multiple Mysql Databases Into One Database?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE