Change password root in MySQL on Redhat Centos
To install MySQL on Fedora 9 again, follow these steps:
Open the terminal on your Fedora 9 system.
Run the following command to install the MySQL server package:
sudo dnf install mysql-server
sudo dnf install mysql-server
sudo systemctl start mysqld
sudo systemctl start mysqld
This will show the status of the MySQL server. You should see the service as "active (running)".If you want the MySQL server to start automatically on system boot, you can enable the service using the following command:
This will show the status of the MySQL server. You should see the service as "active (running)".
If you want the MySQL server to start automatically on system boot, you can enable the service using the following command:
sudo systemctl enable mysqld
sudo systemctl enable mysqld
Check the status of the MySQL service:
sudo systemctl status mysqldWait a few seconds and then check the status again.
sudo systemctl status mysqldWait a few seconds and then check the status again.
sudo cat /var/log/mysqld.log
sudo cat /var/log/mysqld.log
check the password root on the log file
You should now be able to connect without a password.
In the MySQL prompt, run the following command to change the root password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';
ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';
Flush the privileges to make the change take effect:
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
0 Comments
CAN FEEDBACK
Emoji