Java Expert....Java/Open Source Addict

Redes Sociales

twitterlinkedinrss feedemail youtube

Mostrando entradas con la etiqueta password. Mostrar todas las entradas
Mostrando entradas con la etiqueta password. Mostrar todas las entradas

miércoles, 2 de febrero de 2022

Recover your MySQL password on Linux


Hello friends, In this opportunity, I want to share with us  how to recover your MySQL password. For this, I am using Fedora 33 y MySQL Server 8. The steps are the following.

1.- Stop the MySQL service with the sudo systemctl stop mysqld command and verify its status with sudo systemctl status mysqld command


2.- Set the MYSQLD_OPTS environment variable with systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" command.

 


3.- Start MySQL server with the sudo systemctl start mysqld command and verify its status with sudo systemctl status mysqld command.

3.- Connect to MySQL Server as root with the mysql -u root command, execute the UPDATE mysql.user SET authentication_string=null WHERE User='root'; FLUSH PRIVILEGES; and exit.

4.- Connect to MySQL Server as root with the mysql -u root command, execute the  ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'Test..2o22' and exit.

5.- Stop the server with the sudo systemctl stop mysqld command and unset the MYSQLD_OPTS environment variable with systemctl unset-environment MYSQLD_OPTS command.


 6.- Start MySQL server with the sudo systemctl start mysqld command and verify its status with sudo systemctl status mysqld command.

 

 

7.- Finally, verify the change connecting to MySQL Server with the new password.


viernes, 19 de octubre de 2018

Change Password Postgres.app on Mac


Before I show us how to change the password on Postgres is important say us that I used the Postgres.app  program to install Postgres on Mac. It is a tool  that let us manages the database from easy way. However the default installation doesn't include password.



To change the password  we must do the following steps:
  1. Go to the /Applications/Postgres.app/Contents/Versions/10/bin directory and execute the ./psql --u postgres command.
  2. Next we need to change the password throught the \password command. We need to enter the password twice times.
  3. Next quit the postgres console.

4. After that we need to change the autentication method of trust to md5 in the pg_hba.conf  file  located in /Users//Library/Application Support/Postgres/var-10/pg_hba.conf, where is the username of computer.



       5. Finally we need to restart the Postgres.app, for this we must stop the database and start again.