SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need a sctipt to make a batch change to the same field in several mysql databases


Need a sctipt to make a batch change to the same field in several mysql databases

Author
Message
basic 79842
basic 79842
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 4
There may be a function in there already but I use only the barest minimum of the features. So Please excuse my ignorance. I have a situation where I have to change the password of users with the name "admin" to something else.

The people loading the databases were supposed to change it from the default in the first place but no one ever did.
Now I have ... a Lot.. of MYSQL databases all separate that all have that huge security hole. They were all created with the single user of Admin and password of admin to make it easy for the first user to get in and change it.

Instead, they created another account for themselves with their own name and password and gave it admin privileges.
and just left the admin account with the admin password just sitting there. :>(
I recently discovered that no one had even bothered to change the admin password. even if they were not going to use it, if they don't change it or delete that user (they did neither) it leave me with a security issue.

I was hoping there would be a way to batch query every field in all the databases at once because there are at least 70 If I could run a script to fix them all at once to just change THAT username. Just removing the word "admin" from any where is it appears or changing it to anything else for now would be a huge improvement
Thanks for any suggestions. If nothing else, it will be a long run in PHPMYADMIN to fix manually
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18845 Visits: 20460
basic 79842 (9/20/2013)
There may be a function in there already but I use only the barest minimum of the features. So Please excuse my ignorance. I have a situation where I have to change the password of users with the name "admin" to something else.

The people loading the databases were supposed to change it from the default in the first place but no one ever did.
Now I have ... a Lot.. of MYSQL databases all separate that all have that huge security hole. They were all created with the single user of Admin and password of admin to make it easy for the first user to get in and change it.

Instead, they created another account for themselves with their own name and password and gave it admin privileges.
and just left the admin account with the admin password just sitting there. :>(
I recently discovered that no one had even bothered to change the admin password. even if they were not going to use it, if they don't change it or delete that user (they did neither) it leave me with a security issue.

I was hoping there would be a way to batch query every field in all the databases at once because there are at least 70 If I could run a script to fix them all at once to just change THAT username. Just removing the word "admin" from any where is it appears or changing it to anything else for now would be a huge improvement
Thanks for any suggestions. If nothing else, it will be a long run in PHPMYADMIN to fix manually


You are in a SQL Server forum! You will no doubt have more success if you head over to a dedicated MySQL forum.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search