1. After installing MySQL 5.6, it cannot be enabled normally Compressed version of MySQL, after decompression, go to: My Computer -> Properties -> Advanced -> Environment Variables Select PATH and add the path of the mysql bin folder after it (e.g. C:\Program Files\MySQL\MySQL Server 5.6\bin ) Modify or add configuration in my-default.ini: [mysqld] basedir=C:\Program Files\MySQL\MySQL Server 5.6 (the directory where mysql is located) datadir=C:\Program Files\MySQL\MySQL Server 5.6\data (mysql directory\data) port = 3306 Run cmd as an administrator and enter After the installation is successful, you need to start the service. Continue to enter in cmd: After the service is started successfully, you can log in. As shown in the figure, enter 2. Forgot the root password of MySQL 5.6 First, Run the CMD command to switch to the MySQL installation bin directory and execute Do not close this command line window, and open a new one. Note that sometimes a warning will appear at this time, just ignore it. Open a new cmd window again. Run the command in the bin directory as described above: Execute the command: update mysql.user set password=PASSWORD('root') where User='root'; Refresh execution: Close the window and log in 3. Create a user and grant certain permissions (select, delete, update, create, drop permissions) Log in as a user with all permissions Create a user: mysql> insert into mysql.user(Host,User,Password) values("localhost","test",password("1234")); Authorize the user: grant permission on database.* to username@login host identified by "password"; Refresh the system privilege table: Example 1: mysql>grant select,update on testDB.* to test@localhost identified by '1234'; mysql>flush privileges; Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Springboot uses vue+echarts front-end and back-end interaction to realize dynamic donut chart
>>: Detailed description of the use of advanced configuration of Firewalld in Linux
Table of contents Overview File Descriptors Synch...
The page length in the project is about 2000px or...
Table of contents Preface Centering inline elemen...
Preface I believe that the syntax of MySQL is not...
Table of contents 1. Trigger Solution 2. Partitio...
Table of contents Lock Overview Lock classificati...
Preface Since errors always occur, record the pro...
MySQL DATE_ADD(date,INTERVAL expr type) and ADDDA...
[LeetCode] 185. Department Top Three Salaries The...
How to solve the problem of being unable to acces...
Today, when I was using VMware to install a new v...
“How to make a website look high-end? Or more des...
Preface During the development process, we someti...
Connection query: It is the result of connecting ...
Copy code The code is as follows: <html> &l...