hw-1

mysql common add remove dump import operate

mysql common add remove dump import operate

1
2
3
4
5
6
7
8
9
echo "drop table test;" |mysql   --login-path=local -D   'test'
mysql --login-path=local -D 'test' < test.sql

echo "select User , Host from mysql.user;"|mysql --login-path=local
echo "drop database if exists \`test\`;drop user if exists \`test\`@localhost;"|mysql --login-path=local
echo "drop database if exists \`test\`;create database \`test\`;"| mysql --login-path=local
echo "drop user if exists \`test\`@localhost;grant usage on *.* to \`test\`@localhost identified by '123456';"| mysql --login-path=local
echo "grant all privileges on \`test\`.* to \`test\`@localhost ;"| mysql --login-path=local