Ubuntu Quickie: MySQL and PostgreSQL passwords

Another Ubuntu Quickie, this time on the default passwords for MySQL and PostgreSQL.

MySQL

mysql -u root
UPDATE mysql.user SET Password = OLD_PASSWORD(’password’) WHERE User = ‘root’;
FLUSH PRIVILEGES;
\q

PostgreSQL


sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD ‘password’;
\q