Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Vrieze Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
CoTwins
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Instructions for Updating Email Addresses in UserStatus == Email from Paul Resnick in December 2017 describing how to update an email address in the production database. Here's what I did, in case someone else ever has to do this again. But be very careful; you could really do damage if, for example, you left off the where clause from the SQL update queries. 1) First, I went to the google cloud console, for the project Co-twins Users, https://console.cloud.google.com/sql/instances/user-db/overview?project=co-twins-users 2) Go to the SQL (under storage) on the main menu 3) Click on the only instance, user-db 4) Click on "Connect Using Cloud Shell". Now you'll get a unix command prompt, with a command line ready to run. But you will want --user=admin rather than --user=root. So, something like this: presnick@co-twins-users:~$ gcloud beta sql connect user-db --user=admin For password, you'll need to get it from the password file. It's the thing after mysql://admin: and before the @ 5) Now you'll be at an SQL prompt. I entered the following: <syntaxhighlight lang="sql"> use user_schema; select * from users where email_id = 'original_email@original_email.com'; /*(should get back 1 row for a correct email address)*/ update users set email_id = 'new_email@email.com' where email_id = 'original_email@original_email.com'; /*(changes all rows for that email address, in our case just 1)*/ </syntaxhighlight>
Summary:
Please note that all contributions to Vrieze Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MyWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)