SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Can a different password allocate you to a different DB?

    Hey guys.

    I'm building an application on the desktop which connects to the same database as a certain website, giving the user control of their website from the desktop.

    I want to sell this application/website package, so I've been thinking of an approach which goes like this:
    1. The user registers an account for a certain price and gets 2 license tokens
    2. The user can spend a token to register database connection details, not including the password (so they would feel more comfortable registering). This means that if they want more sites to be modified by the application, they need another license.
    3. When the user opens the application, they give their license code and their database password.


    Now, I think this is a strong method of defeating code piracy, but first I need to know, can a MySQL engine serve a different database depending on the password given? If so I need to rethink my plan of attack.

    For example, could the username 'Dave' and the password 'FirstPassword' retreive a different database than the username 'Dave' with the password 'SecondPassword'?
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure you can have it actually server a different data base on password alone. Any method that I can think of, you would have to have different user credentials all together.
    --------------------

    Web Hosting Reviews, News and Articles
    www.kubus.net

  3. #3
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    i'm unclear on something here. if i were to register, i would have to provide a username and password to let you log in to my mysql server? if that's the case, i would create a dedicated user with very specific permissions, and it sure as hell would have a password.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  4. #4
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm not quite sure what you are saying there Longneck.

    Here's how it goes:
    • The client application submits the given license key to the managing server.
    • That server then returns the database host, database name and username to the application
    • The password is entered by the user on the client application.
    • The client application then connects to mysql, and the program can be used properly.


    In other words, it's making sure that every database has a different license key, which requires payment.


    What I was asking was could it be possible that a mysql engine could serve a different database where all of the credentials are the same apart from the password?

    By the sounds of things, that can't be done, which is a good thing for my application (otherwise different passwords used with the same license key could retrieve different databases, defeating the point of the licensing tokens in the first place).
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  5. #5
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arkinstall View Post
    In other words, it's making sure that every database has a different license key, which requires payment.
    well, simply by looking at the database schema for the mysql database, it's pretty clear that user and host are used to uniquely define users. the only place the password is stored is the user table. so you're right, same user with different passwords (with same or differing permissions) is not possible.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  6. #6
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Good news then
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •