TechSpot

MySQL question.

By Spike
May 21, 2005
Topic Status:
Not open for further replies.
  1. In my little web project that's about to be started, I'm condsidering two different pieces of software, being OsCommerce, and phpBB2.

    Both of these are PHP based softawres, and both of these require a MySQL database.

    At the moment, I'm getting ready to start putting this project together. I've installed Apache, and I'm downloading PHP 4 at this very moment, which I'm about to install onto Apache

    The problem is twofold. I know very little about MySQL, and so I'm wondering if there's anything I need to do to enable it on my apache server?

    The other issue, is that the host I'm thinking of using offers only 1 MySQL database for the price plan I would like to use. I was wondering then, whether it would generally be possible to set up OScommerce, and then use the same Db to install phpBB2, or vice versa. If it is, in time I may even be able to link the two by user-account (ie, one single sign in - once I know a little more). Alternatvely, is it the case that this is not possible, and I would have to go with a higher hosting plan to use a second database, and if so, would there be any way of linking the two pieces of software (not specifically, but purely in theory) to create a single sign-in scenario?
  2. Phantasm66

    Phantasm66 TS Rookie Posts: 6,504   +6

    Mysql is pretty easy to get into, if you already know about SQL and relational databases.

    http://dev.mysql.com/tech-resources/articles/mysql_intro.html

    As to your second question, I think that both pieces of software will be quite capable of talking to the same Mysql instance, so both could share the same databases.
  3. Nodsu

    Nodsu TS Rookie Posts: 9,431

    You don't have to know anything about MySQL to set up a program that uses it. Most solutions just want to know the database server, the username, password and the database name to use and will set themselves up automagically.

    The one database in a web service is not about mysql instances. It is the amount of databases you can create inside the mysql instance.

    I suppose you could tell both your programs to use the same database (give them the same database name they should use). It can only work if the programs don't have any tables with the same names. If phpBB2 and OScommerce both have a table called "users" but the the table format is different then you are in big trouble.

    The possibility of a single sign-in depends heavily on the specific pieces of software and their configurability.
  4. Spike

    Spike TS Rookie Topic Starter Posts: 2,371

    That's brilliant! thankyou very much!!!!

    I guess the only thing left ot ask then, would be that in the case of the single sign in, If all else failed, would it be a straightforward (though possibly long winded) matter of changing the registration and and login tables referred to in one of the programs to refer to the same tables as the other, and possibly hacking the registration details script to add a requirement for the relevant fields requiers for both programs. Obviously this assumes that the appropriate fields for such would be merged into that table. Could it work, or does this acctually sound like more trouble than it's worth, or more difficult than I possibly realise?
  5. Phantasm66

    Phantasm66 TS Rookie Posts: 6,504   +6

    If you are running more than one app, I would recommend using a seperate database for each, but use the same mysql instance.

    If you are on a UNIX system, I could help you write a shell script to backup the mysql databases into files, which you could place in a cron job.

    Sorry, I know that doesn't really answer your question, it was just some more help I could think of.
  6. Nodsu

    Nodsu TS Rookie Posts: 9,431

    Since your programs are open source then you can rewrite them in any way you like. It is all about your skills with PHP and SQL..
  7. Spike

    Spike TS Rookie Topic Starter Posts: 2,371

    Very good point Nodsu, and Thanks Phant :)

    I'm afraid my skills are minimal or less at the moment. I'm on a fairly steep learning curve with this.

    It's the first time I've set up a server on my machine for testing, and I've managed to get apache working, installed PHP4, I've installed a MySQL server, and added phpMyAdmin.

    I do have one or two issues I'm working through, but I have two problems I can't understand.

    First, in phpMyAdmin, I get the following alerts...
    I understand niether of these, particularly as I've read advice to the contrary of the first alert!

    Secondly, after installing OsCommerce, I was flicking through the administration options, and spotted the only problem I've found so far, being on the customers --> orders section....

    Given that I have so little knowledge of MySQL, I can't tell whether this is a bug in the software, a problem with my PHP install (the least likely option I feel) or otherwise a problem with my MySQL server/version or the way I've configured it.
  8. RealBlackStuff

    RealBlackStuff TS Rookie Posts: 8,165

    It should be $cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin-2.6.1-pl3' in order to work.
    Otherwise set $cfg['PmaAbsoluteUri_DisableWarning'] = TRUE; to disable the warnings.

    Do a Google with "limit -20, 20" (and you MUST use the double quotes!).
    Plenty help already in the first 2 Google results.
  9. Spike

    Spike TS Rookie Topic Starter Posts: 2,371

    Thankyou very much RBS :) Much appreciated!
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.