Skip to content

Atribuir/trocar senha no PostgreSQL e MySQL

Para não esquecer mais como atribuir/trocar senha no PostgreSQL e MySQL:

No PostgreSQL


$ sudo passwd postgres
$ su postgres
$ psql -c "ALTER USER postgres WITH PASSWORD 'sua senha'" -d template1

No MySQL


mysqladmin -u root password NEWPASSWORD

Leave a Reply

Your email address will not be published. Required fields are marked *

Marco Reis
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.