mysql> GRANT All privileges on * * to ' root ' @ ' localhost '
- identified by ' Some_pass ' with GRANT OPTION;
Permissions for local operations
mysql> GRANT All privileges on * * to ' root ' @ '% '
- identified by ' Some_pass ' with GRANT OPTION;
first of all, to declare: In general, to modify the MySQL password, authorization, is required to have the root authority in MySQL.
Note:This operation is at the win command prompt, phpMyAdmin also applies.
User: Phplamp user database: phplampdb
1. Create a new user.
Log in to MySQL
@>mysql-u root-p
@> Password
Create user
mysql> INSERT INTO Mysql.user (Host,user,password) VALUES ("localhost", "Phplamp", Password ("1234"));
Refresh System Permissions Table
Mysql>flush privileges;
This creates a user named: Phplamp with a password of: 1234.
Then log in.
mysql>exit;
@>mysql-u phplamp-p
@> Enter password
Mysql> Login Successful
2. Authorize the user.
Log in to MySQL (with root privileges). I am logged in as root.
@>mysql-u root-p
@> Password
First create a database for the user (phplampdb)
Mysql>create database phplampdb;
Authorizes the Phplamp user to have all the permissions of the Phplamp database.
>grant all privileges in phplampdb.* to [e-mail protected] identified by ' 1234 ';
Refresh System Permissions Table
Mysql>flush privileges;
Mysql> Other operations
Fix local software link not on virtual machine MySQL problem: Grant all privileges on * * to ' root ' @ '% ' identified by ' NSFocus '