After installing MySQL, you will find that the root password is not empty after executing Edit the MySQL configuration file my.ini (if it is my_default.ini, please rename it to my.ini), and add the following under the [mysqld] entry: skip-grant-tables After saving and exiting, restart MySQL and click "Start" -> "Run" (shortcut key Win+R). 1. Stop: Enter net stop mysql 2. Start: Enter net start mysql At this time, enter mysql -u root -p in cmd to log in without a password. When password: appears, press Enter to enter. ERROR 1045 (28000) will not appear, but many operations will be restricted because we cannot grant (no permission). Follow the process below: 1. Enter the mysql database: mysql> use mysql; Database changed 2. Set a new password for the root user and enter the blue part yourself: mysql> update user setauthentication_string=password("new password") where user="root"; Query OK, 1 rows affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 3. Refresh the database mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) 4. Exit mysql: mysql> quit Bye After the change, modify the my.ini file again, delete the "skip-grant-tables" line we just added, save and exit, and restart mysql. You will be prompted after logging in again ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. Just enter The above is the solution to the problem that the root account prompts mysql ERROR 1045 (28000): Access denied for use appears after logging in to the newly installed MySql. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Two tools for splitting the screen in the Linux command line terminal
>>: Vue integrates PDF.js to implement PDF preview and add watermark steps
Table of contents Preface 1. Install scp2 2. Conf...
Mysql join query 1. Basic concepts Connect each r...
When joining a Windows 2008 server subdomain to a...
We all know that data is priceless. If we don’t b...
When designing H5 layout, you will usually encoun...
1. Embed is illegal The <embed> tag is a pri...
mycli MyCLI is a command line interface for MySQL...
Record the problem points of MySQL production. Bu...
<br />This article has briefly explained the...
Directly code: select 'bigint unsigned' a...
Since the standard ab only supports stress testin...
background Before we know it, a busy year is comi...
Preface Recently, due to work needs, I need to in...
Table of contents Preface 1. GMT What is GMT Hist...
Batch replace part of the data of a field in MYSQ...