Connect to a cloned database
If you have for some reason cloned a database in the console, you need to do some manually changes on the new database to be allowed to connect to it with your.
- Log in to the database with the old username and password
- Run GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "cloned-user";, to give the new cloned user access to all the old tables. If you have objects outside of tables those also needs to be changed.
- Delete the google-sql-appname-secret from the cluster (if it exists). This allow Naiserator to generate new secrets for the cloned database.
- Update your nais.yaml-file to use the instance name of the cloned database instead of the old ones.
- Delete the old database when you are finished.