MySQL: Bring over user from other database

I have a production database server with a database "widgetdb"  that I restored onto another database server. I was easily able to do the restoration onto the new server, but now I want to bring over a specific user that was associated with that database.

Now the main problem is that the database (both the other server and the new server), is accessed through a web application and the user needs to be the same in both systems. The user on the previous system is identified using a hash to figure out their password. This keeps me from just recreating the user on the second system.

Is there a script or procedure or something for bringing over a user, whole password and all ?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
The hash is the password in the user table.  But somewhere in the application or a program that connects to it, the username, password, and access method must be available to be able to make the connection.  You should be able to find the username and password somewhere on the first system and the access method or IP address on the second system can be whatever is needed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try copying the hash and setting it as the password for the user.
That should work.

Export the select * from mysql.user where user=user from the old
Then load the result into the new one.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.