mysql建庫及使用者命令例項

2021-06-14 16:50:30 字數 346 閱讀 9332

這裡記錄下mysql命令列下建立庫及使用者的命令

>mysql -u root -p

>show databases;

>create database new_database;

>create user 'name' identified by 'pwd';

>grant all privileges on new_database.* to 'name'@'localhost' identified by 'pwd' with grant option;

>quit

>mysql -u name -p

>show databases;

MYSQL建庫建使用者命令

1 登陸mysql mysql u root p 2 檢視使用者資訊 select user,host,password from mysql.user select user,host from mysql.user 3 設定密碼 set password for root localhost p...

MYSQL建庫建使用者命令

1 登陸mysql mysql u root p password 輸入密碼 2 檢視使用者資訊 select user,host,password from mysql.user select user,host from mysql.user 3 設定密碼 set password for ro...

MYSQL的建庫建使用者命令

1 登陸mysql mysql u root p password 輸入密碼 2 檢視使用者資訊 select user,host,password from mysql.user select user,host from mysql.user 3 設定密碼 set password for ro...