Detailed steps to install MySQL to change the default password in Ubuntu

Step 1: Enter the directory: cd /etc/mysql, check the debian.cnf file

Step 2: Log in to MySQL using the account password in the figure above.

The third step: View the library in the database.

Step 4: Use the mysql library.

Step 5: Use the following statement to set the account password: update user set authentication_string=PASSWORD("Custom new password") where user='root';

My personal setting is simple. The account is root. Password: 123456.

Step 6: Execute the following statement: update user set plugin="mysql_native_password";

Step 7: Refresh: flush privileges;

Step 8: Exit: quit;

Step 9: The password modification is complete. Enter :/etc/init.d/mysql restart; in the command box to restart MySQL

The last step: log in again. Congratulations on your success in changing the default password.

to sum up

The above are the steps for installing MySQL to change the default password in Ubuntu introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Posts

Detailed steps to install MySQL to change the default password in Ubuntu
How to install mysql in Ubuntu 14.04
Detailed steps to automatically set the line number in ubuntu16.04
How to change MySQL password under Ubuntu
Detailed steps to install Anaconda on Linux (Ubuntu 18.04)
How to install the latest MySQL on Ubuntu 18.04
Detailed steps to install Sogou input method on Ubuntu 20.04
Detailed steps to install and configure k8s cluster in centos 7
How to install Helm in Ubuntu
Ubuntu install MySQL password initialization problem
Ubuntu change password and username steps
How to install MySQL on Ubuntu 14.04
Steps to upgrade Laravel 5.4 to 5.6 in Ubuntu 16.04
How to install cuda10.1 driver in Ubuntu
How to install MySQL on Ubuntu 18.04 (linux)
How to install ROS Noetic in Ubuntu20.04
Install Ubuntu 18.04 in the virtual machine VMware
Ubuntu20.04 steps to install cuda10.1 (graphic tutorial)
Ubuntu modified the default sh to bash
How to install python in ubuntu server environment
The solution to the failure to install .deb under Ubuntu 16.04
How to open the ubuntu system in win10
Wsl sets the default account to root (ubuntu18.04)
How to install the downloaded module in python
The ultimate guide to install gooderp on ubuntu
Remotely connect to MySQL database in Ubuntu environment
Introduction to the use of Hanlp in ubuntu
How to change root user password on Ubuntu
How to install Hadoop in standalone mode on Ubuntu 18.04
Install mysql-pytho in Ubuntu
The default installation path of apt-get install of ubuntu (transfer)
Install MySQL5.7 in centos7
Install mysql under Ubuntu 16.04
How to install and use MySQL Workbench on Ubuntu 18.04
Install mysql on Ubuntu 14.04
Modify the default root password of the Ubuntu operating system
How to view detailed network routing table in Ubuntu
Ubuntu19 install MySQL pit
Complete steps to configure IP address in Ubuntu 18.04 LTS
Complete steps to realize face recognition login in Ubuntu
Install python in Ubuntu
Install JDK in Ubuntu19.10
Install MySQL under Ubuntu
Detailed steps to configure Ubuntu 16.04 and Apache virtual host
Detailed steps to install centos on vmware10.0 cracked version
How to control the ubuntu system in win10 through ssh
Mac uses vnc to remotely log in to the ubuntu16.04 desktop
How to install memcache and start it in ubuntu environment
Detailed steps for installing Django under Python 3.6 in Ubuntu 16.04 environment
How to compile and install PHP and Nginx in Ubuntu environment
How to install JDK and Mysql on Ubuntu 18.04 linux system
Install VMware Tools in Ubuntu 18.04
Ubuntu install the latest Python 3.
Install Mysql offline on Ubuntu
ubuntu root default password (initial password)
Install mysql5.7 on Ubuntu (Tell people tirelessly, remember to dry goods)
Detailed steps to install virtual machines with VMware 15 and use CentOS 8
How to install JDK 13 in the Linux environment using compressed packages
Detailed explanation of the installation and use of SSH in the Ubuntu environment
Centos8 uses Apache httpd2.4.37 to install web server steps in detail
How to install Ruby on Ubuntu 20.04