mysql授权、导入等基本操作
时间:2021-07-01 10:21:17
帮助过:27人阅读
mysql -uroot -p
rootpwd mysql -e "INSERT INTO user (Host,User,Password,ssl_cipher,x509_issuer,x509_subject) VALUES(‘%‘,‘
username‘,‘
pwd‘,‘‘,‘‘,‘‘);"
mysql -uroot -p
rootpwd mysql -e "GRANT ALL PRIVILEGES ON *.* TO ‘
username‘@‘%‘ IDENTIFIED BY ‘
pwd‘ ;"
mysql -uroot -p
rootpwd mysql -e "GRANT ALL PRIVILEGES ON *.* TO ‘
username‘@‘127.0.0.1‘ IDENTIFIED BY ‘
pwd‘ ;"
mysql -uroot -p
rootpwd mysql -e "GRANT ALL PRIVILEGES ON *.* TO ‘
username‘@‘localhost‘ IDENTIFIED BY ‘
pwd‘ ;"
mysql -uroot -p
rootpwd mysql -e "flush privileges;"
2、导入数据库
mysql -uusername -ppwd -e "source $path/aaa.sql ;"
mysql -uusername -ppwd dbname -e "source $path/add.sql ;"
mysql授权、导入等基本操作
标签:roo style mysql iss cipher dbn ges value span