![]() |
reset mysql password
I have a server ( live ) which have mysql database , I forget mysql root password , could advise if it is possible to copy the db to other server ( testing ) and then set root password ? as I would not to change live server mysql root password.
thanks |
You can copy the physical files but you will have to stop your live MySQL instance during the copy process.
Then you can experiment with the recommended root reset procedure on your copy. |
First stop your mysql server, than start it with option --skip-grant-tables
Code:
#mysqld_safe --skip-grant-tables Code:
#mysql --user=root mysql Code:
update user set Password=PASSWORD('new-password') where user='root'; Here is an howto that describes the whole proces: http://www.howtoforge.com/reset-forg...-root-password |
One more question , if I have 3 mysql databases in a server , could it set to individual password for each mysql db ? thanks
|
You can create as many users as you wish within MySQL.
Each user can have their own password and can have their own permissions on different databases. I have a server that has 18 different databases for different websites, each of those websites has their own username/password/permissions. One of those websites has three databases and the user has permissions on all three of them. I also have other usernames with different permissions for replication and for backup. If your next question is "how do I do this" then start another thread rather than having two different questions in the same thread. |
All times are GMT -5. The time now is 09:13 PM. |