UPDATE user SET authentication_string=PASSWORD('newpass') WHERE user='root' īut the new password does not work at all. I also tried sudo mysqld_safe -skip-grant-tables -skip-networking & is correct version of my mysql server, but no result - as I read in another discussion this is possibly obsolete solution but I tried it anyway. I also tried sudo dpkg-reconfigure mysql-server-5.7ĥ.7. Result is ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) The file consisted of UPDATE er SET Password=PASSWORD('pass') WHERE User='root' I tried to start mysql server with special init file via mysqld -init-file=/home/me/mysql-init & I went through many discussions about root password reset and no success. Not possible to login as root without password. USE mysql UPDATE user SET password PASSWORD ('your new password') WHERE user 'root' FLUSH PRIVILEGES Be sure to stop mysqld and restart it normally after you've done this, though, so clients get their passwords checked again. The password was somehow set and I do not not how it is possible as it's a fresh installation.īecause I was confused, I tried removing MySQL packages as was somewhere suggested sudo apt-get remove -y mysql-*Īfter this I made a new installation sudo apt-get install mysql-serverīut the result is the same. Then you can set the root password to something you'll remember. During installation there was no request for password and when I try mysql -u root -p And I'm having problems logging into the database. ALTER USER 'root''localhost' IDENTIFIED BY '' Share.sudo mysql -u root -p Enter password: (press enter as no password is set) after then can easily run query. I installed MySQL (fresh) on my Ubuntu 18.04. Follow these steps to set root password in 18.04: As there is no password set for root user, simply login with blank password.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |