[Question] What happens if same MySQL database is used for multiple scripts?

Discussion in 'MySQL' started by Ethical Geek, Jan 24, 2011.

  1. #1
    The question is mentioned as above. Please let me know if you've answer to it.

    One more Question!

    Supposing that I'm using a video script(clip-art or phpmotion) and a myBB forum, both using different MySQL databases on my website.

    What would I've to do if I would like to have my forum members (registered ones) to access the video site(on another subdomain on the same website) without having to register there again. (assuming my website will offer both the services!--- myBB forum and Video broadcating)

    I'm a learner. Kindly help me out.

    Thank you!
     
    Ethical Geek, Jan 24, 2011 IP
  2. mysqlxpert

    mysqlxpert Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    How you identify that a members is already registered? Do you have a login protected area?
     
    mysqlxpert, Jan 24, 2011 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The title question could have two possible rationales. As long as the 2 scripts have different table, procedure, function etc names then there is no real problem having 2 scripts off of 1 database but as these could change in the future it is generally sensible to have them on 2 different databases (could be on same sql server) to avoid conflicts.

    If you want to use a universal log in (the subdomain issue aside) you need a developer to look at the two scripts processes of authentication and align them (generally by making one match the other).

    Subdomains are a bad idea on so many levels but if you insist on using one then whilst someone can be easily registered once to log into both subdomains it is more complex to make it such that logging into one logs them into all subdomains (but is possible). The standard effect would be that they would need to log into each subdomain individually even though using the same credentials
     
    AstarothSolutions, Jan 24, 2011 IP
  4. Ethical Geek

    Ethical Geek Member

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #4
    @ mysqlxpert
    Yes it's a login protected area.

    @ AstarothSolutions
    Thank you very much for shedding some light on the issue. Probably, I get the idea now.
     
    Ethical Geek, Jan 25, 2011 IP
  5. sbcjr

    sbcjr Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sbcjr, Feb 1, 2011 IP
  6. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    there is no issue running 1 database with multiple scripts or even hundreds of scripts for that matter. The data will still be passed you just need to make sure your connection string is working for each script and that your data is being processed into your variables correctly and that they are not overlapping.
     
    srisen2, Feb 3, 2011 IP
  7. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    although you will have to declare separate variables names in many cases to avoid overlapping your variable from one query to another
     
    srisen2, Feb 3, 2011 IP
  8. eexpress

    eexpress Active Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #8
    I've had no problems running multiple scripts using the same database so it's not a problem.
     
    eexpress, Feb 3, 2011 IP
  9. thewantedhost

    thewantedhost Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You have sessions to look after as well, this is, if you wish to have the users only login once.
     
    thewantedhost, Feb 5, 2011 IP