MySQL - Linux - RESTORE MySQL Server ROOT Password

Опубликовано: 14 Март 2013
на канале: Davids Videos
10,120
40

In this tutorial I show you how to reset the root pasword for your mysql-server if you have either forgotten it or didnt ever know it. You need to be logged in as root on the server in order to change the root password of the mysql server. Firstly you need to stop the mysql service by issuing the command, "service mysqld stop", then you can issue the next command of "mysqld_safe --skip-grant-tables", this will then start the mysql server without checking the privileges and especially the password. Once you have done this you will need to open another terminal window, and simply issue the command "mysql", this will log your straight into the server. Now, execute an update command to change the password of the root user, in the user tables of the mysql database. "update mysql.user set password=PASSWORD('password') where User='root';". Execute the command, it should then tell you that there have been rows affected. From this point you need to flush privileges...which I forgot to mention...Ooooops. Although as you can see from the video everything worked just fine. From this point on you can login as normal. Firstly you will be required to restart the mysqld service once again, because it is still running in mysqld_safe mode. Issue the command, "service mysqld restart" then you can login to mysql normally, providing a password and username if required.


Смотрите видео MySQL - Linux - RESTORE MySQL Server ROOT Password онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Davids Videos 14 Март 2013, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 10,120 раз и оно понравилось 40 людям.