The question of amending the root password error after installing Ubuntu mySQL
Reference books: "Python3 web crawler developed combat" in April 2018 the first edition 1.4.1
System: Ubuntu 18.04.2 LTS
Background: already installed mySQL, mySQL into the command line
command:
use mysql;
UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';
FLUSH PRIVILEGES;
Error:
ERROR 1054 (42S22): Unknown column 'Password' in 'field list'
the reason:
Database mysq L in the Table the User password column column names were changed, and now the column named authentication_string .
In turn enter the following command to view the user names listed in:
use mysql;
show tables;
describe user;
It can be seen in the description associated with the column (see below) output, and therefore to modify the commands to the following code:
UPDATE user SET authentication_string = PASSWORD('newpass') WHERE user = 'root'