CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: MySQL password

  1. #1
    Join Date
    Mar 2004
    Posts
    339

    MySQL password

    As i have two part (photo gallery and forum) and they use the different login system...
    now i want to implement the following functions:

    when a user register for the forum, the user name and password will be copied to the photo gallery for registration, so one registration for two function parts.

    However, since the password is encrypted, i would like to ask how i can copy the password to other part of the database?

    Thank you

  2. #2
    Join Date
    Jan 2003
    Location
    North Carolina
    Posts
    309

    Re: MySQL password

    I assume you store the password encrypted in the database from your question. As long as you are using the same encryption method and keys then doing a straight copy thru code should do the trick. However I don't use MySQL at all right now and haven't made time to work with it but you might could use a trigger as well.

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: MySQL password

    The users' passwords are stored in mysql.user table.
    So you can select the password from the table above mentioned.
    To calculate a password string from the plain text sting you can use PASSWORD MySQL function.
    See MySQL Reference Manual for more details.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: MySQL password

    Quote Originally Posted by antares686
    However I don't use MySQL at all right now and haven't made time to work with it but you might could use a trigger as well.
    Unfortunatelly, as I know, MySQL does not (yet) support triggers.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured