Grundlegende Kontobetrieb in MySQL

I have finashed mysql installation and need to change root password to “123456”

(original password is null)

cd ../mysql/bin/

mysqladmin -u root -p password 123456

click enter key if sytem request password.

confirm new password

mysql -u root -p

input password “123456” ,pressing enter, you can login mysql

 

add an user test and set it’s password as “123456”, only allow this user login mysql

from client 192.168.1.5, and user test has all permission on any database and tables.

grant all privileges on *.* to [email protected] identified by “123456”;

 

add an user test and set it’s password as “123456”, allow this user login mysql from

any client, and user test has all permission on any database and tables.

grant all privileges on *.* to test@’%identified by “123456”;

 

check current user

select user();

switch to mysql database

benutze MySQL;

check all details about table user

wählen * from user \G;

 

check user,Passwort,host information of table user

select user,Passwort,host from user;

 

generate userccand set it’s password as “123456” , only allow this user login mysql from

localhost.

create user ‘cc’@’localhost’ identifiziert durch „123456“;

 

remove all users which only be allowed login mysql from localhost.

delete from mysql.user where user=’ccand host=’localhost’;

Hinterlasse eine Antwort