Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4329750
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:51:57+00:00 2026-05-21T09:51:57+00:00

I have an ugly server issue , and i’m trying not to overlook any

  • 0

I have an ugly server issue, and i’m trying not to overlook any details on this.

My virtual email users’ passwords are stored with MySQL’s ENCRYPT function. My basic idea was I’ll dump my virtual users’ table from the old machine, then import it in the new one.

Just for double-check I tried to store a string with ENCRYPT then again, and the stored data was different. Does this mean I can’t export/import my users simply as I thought?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:51:58+00:00Added an answer on May 21, 2026 at 9:51 am

    What Datajam has already described is correct. Here’s some further explanation.

    If you don’t supply a salt to the ENCRYPT() function then a random one will be generated and used to encrypt the string. The salt is just two bytes/characters.

    First I’ll demonstrate that if I run ENCRYPT() twice with the same string it’ll give different values (because the random salt differs)

    mysql> SELECT ENCRYPT('hello');
    +------------------+
    | ENCRYPT('hello') |
    +------------------+
    | 5Q5CiJWj4GItY    | 
    +------------------+
    1 row in set (0.02 sec)
    
    mysql> SELECT ENCRYPT('hello');
    +------------------+
    | ENCRYPT('hello') |
    +------------------+
    | 7QHPY3iSLVdas    | 
    +------------------+
    1 row in set (0.00 sec)
    

    Now if I use the last entry and attempt to ENCRYPT() again using the value we have already as the salt we’ll get the same result back:

    mysql> SELECT ENCRYPT('hello', '7QHPY3iSLVdas');
    +-----------------------------------+
    | ENCRYPT('hello', '7QHPY3iSLVdas') |
    +-----------------------------------+
    | 7QHPY3iSLVdas                     | 
    +-----------------------------------+
    1 row in set (0.00 sec)
    

    Just to prove that if we get the string (password) wrong with the same salt we’ll get a different value. Note that in this example the two first characters (which are just the salt) remain the same.

    mysql> SELECT ENCRYPT('helloX', '7QHPY3iSLVdas');
    +------------------------------------+
    | ENCRYPT('helloX', '7QHPY3iSLVdas') |
    +------------------------------------+
    | 7QKDSis4DZnCU                      | 
    +------------------------------------+
    1 row in set (0.01 sec)
    

    Using this information you should try to run the ENCRYPT() function both of the MySQL servers specifying the same salt with both you should get the same result back. If not then the implementation of crypt() likely varies between the two.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some very ugly data I am trying to massage. It consist of
Input textfield in AIR for iOS looks really ugly when it does not have
ok, so i can't tell if this is a server issue or what. i've
I have a JSON object returned from server. It looks like this : {1:{id:1,name:autos},
We have a Ruby-on-rails server-side deployment that needs to allow users to download a
I have the following ugly if statement that is part of a class that
So have rewritten my ugly php URL to something prettier: RewriteEngine On RewriteRule ^main/photo([^/\.]+)/?.html$
For some reason I have a very ugly orange part of a border around
Ever since I installed emacs on a new machine I have seen an ugly
I have to use an ugly C-library inside my c++ application. In the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.