homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Updating Multiple Databases

 9:03 am on Aug 1, 2007 (gmt 0)

I need to update 100 databases, we have a default username and password in each database in the table staff.

We need to change this username and password for each occurance in each database.

Its the admin pass and user for each website, the ID of the Admin account is different in each database so will have to update by firstname and surname.

update staff
set username "AdminNew"
set password "passNew"
where fname = "Administrator"

but across 100 databases

Any help apreciated



 3:23 pm on Aug 1, 2007 (gmt 0)

Do you mean 100 databases or 100 tables? What DB are you using?


 7:06 pm on Aug 1, 2007 (gmt 0)

if the table has the same data in all 100 db's, you could create the table in one db, dump it, and then import it into the other 99.

or you could create a script that generates 100 files containing the proper update sql for each db and then another script to feed the correct sql file as input into the correct db.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved