經常使用命令

一、經常使用命令mysql

CREATE USER 'username'@'host' IDENTIFIED BY 'password';

CREATE DATABASE IF NOT EXISTS my_db default charset utf8 COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;

set password for 'testuser'@'%' = password('passwd');

mysqldump -uroot -p123456 dbname --ignore-table=dbname.tb1 --ignore-table=dbname.tb2 > dsp.sql

select user_name,count(*) as count from user group by user_name having count>1;ALTER USER 'root'@'localhost' IDENTIFIED BY 'i@FquPfgu2qm121';   //mysql5.7首次修改密碼
相關文章
相關標籤/搜索