just installed mysql password

Solutions on MaxInterview for just installed mysql password by the best coders in the world

showing results for - "just installed mysql password"
Rodrigo
14 Jun 2017
1$ sudo cat /etc/mysql/debian.cnf
2Note the lines which read:
3
4user     = debian-sys-maint
5password = blahblahblah
6Then:
7
8$ mysql -u debian-sys-maint -p
9Enter password: // type 'blahblahblah', ie. password from debian.cnf
10
11mysql> USE mysql
12mysql> SELECT User, Host, plugin FROM mysql.user;
13+------------------+-----------+-----------------------+
14| User             | Host      | plugin                |
15+------------------+-----------+-----------------------+
16| root             | localhost | auth_socket           |
17| mysql.session    | localhost | mysql_native_password |
18| mysql.sys        | localhost | mysql_native_password |
19| debian-sys-maint | localhost | mysql_native_password |
20+------------------+-----------+-----------------------+
214 rows in set (0.00 sec)
22
23mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
24mysql> COMMIT;  // When you don't have auto-commit switched on
25Either:
26
27mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
28Or:
29
30// For MySQL 5.7+
31UPDATE mysql.user SET authentication_string=PASSWORD('new_password') where user='root';
32Then:
33
34mysql> FLUSH PRIVILEGES;
35mysql> COMMIT;  // When you don't have auto-commit switched on
36mysql> EXIT
37
38$ sudo service mysql restart
39$ mysql -u root -p
40Enter password: // Yay! 'new_password' now works!
queries leading to this page
how to set root user password in mysqlchange root password mysql ubuntuhow to change mysql root password in ubuntudefualt password for mysql roothow to change password for mysql root userset a new mysql root passwordmysql restore root password windowsupdate mysql root passwordhow to get your mysql root passwordmysql root password setting fileroot account password mysqlhow to find mysql root passwordgrep a temporary password 2fvar 2flog 2fmysqld log in windowsset root password for mysqlubuntu mysql set root passwordmysql set root passwordset root password mysqlmysql root password forgotsudo mysql secure installation root passwordmysql secure install defualt password of ropti have forgotten my mysql root passwordupdating mysql root passwordjust installed mysql passwordcan remember my mysql root passwordhow to change mysql password in ubuntu with rootmysql current root passwordchanging mysql root password ubuntumysql installed without passwordmysql change root password ubuntumysql change password for rootforgot mysql root password windowswhat is root user password in mysqlchange root password mysqlmysql default root password windowsfind root password mysqlhow to retrieve or change mysql root password after installing againhow to change mysql root password forgottenmysql secure installation root password not workingmysql create password for rootcurrent root password mysqlmysql community server passwordmysql root passwort set passwordforgot mysql root passwordchange pass mysql rootchange root user password mysqlmysql secure installation passwordmodify password of root user mysqlchange mysql root password ubuntusecuring the mysql server deployment enter password for user root 3achange password root mysqlhow to change mysql root passwordforgot the root password in mysqlmysql force root password changehow can i change mysql root passwordroot password mysqlmysql modify root password error windowshow to change the password from the root mysql if i forgot databasemysql edit root passwordchanger password root mysqlhow to set root password in mysqlmysql change root password without knowing it ubuntumysql change root passwordmysql forgot root passwordmysql community root passwordmysql root passwordmysql set password for root on initializefind mysql root password windowshow to find out the root password for mysqlchange mysql root password when you don know the current passwordedit root password mysqlchange mysql root passwordforgotton mysql root passwordmysql installed how to get passwordmysql force root password mysql command line update root user passwordchanging mysql root password windowsset root password in mysql ubuntumysql install password rootmysql show root passwordhow to change mysql root user password in ubunturetrieve password mysql rootmysql default root passwordmysql forgot root password windowshow to change the password of root user in mysqlhow to retrieve or change mysql root passworddefault mysql user pterdefault password for mysql 5 7change password for root 40localhost in mysql shellchange password for root user mysql in terminalupdate root password mysqlmysql get root passwordwhat is the preset password of mysql secure installationjust installed mysql password