MySQL Forums
Forum List  »  Install & Repo

Finding root password on new 5.7 install
Posted by: CHARLES WANGERSKY
Date: May 04, 2020 03:22PM

It appears that the MySQL 5.7 installer for Mint Linux does not like to install with a blank password, instead generating a random password for 'root' and copying that into a log file that I cannot locate. (TechRepublic says /var/log/mysqld but there is no such file on Mint.) I have tried to reset the root password with no luck; last thing I tried, after forcing a clean install, was

sudo mkdir /var/run/mysqld
sudo chown mysql /var/run/mysqld
sudo --user=mysql mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root mysql
mysql> update user set authentication_string=PASSWORD('somepassword') where user='root';
mysql> flush privileges;
mysql> quit;

The update returned "1 row changed, 0 errors, 1 warning' but didn't say what the warning was. After this, I found I could not stop mysqld_safe, so I rebooted; but at that point I found that the password I had set did not work.

What am I doing wrong? Is there any way to set that password, or do I abandon MySQL for something else?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.