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 frame First-class error reporti...
Introduction Closure is a very powerful feature i...
This article example shares the specific code of ...
Recently, when I was doing a practice project, I ...
There are two ways to delete data in MySQL: Trunc...
This article shares the specific code of js to re...
Preface This control will have a watermark at the...
Product designers face complex and large manufactu...
A few days ago, I wrote an article about using CS...
1. Basics of Linux Firewall The Linux firewall sy...
MySQL is divided into Community Edition (Communit...
After installing VMware and creating a new virtua...
Preface Today I will share with you a holy grail ...
MySQL Advanced SQL Statements use kgc; create tab...
1. What is Refs is called Resilient File System (...