期盼死亡的小丑 发表于 2018-10-2 14:02:00

mysql脚本

#!/bin/sh  echo "pleaseinputResserveraddress: "
  readResserver
  echo "pleaseinputGameserveraddress: "
  readGameServer
  path=`pwd`
  mysql   -u   root   
  grant all on testLog.* to "test"@"$Resserver">
  grant all on testLog.* to "test"@"$GameServer">  insert into test.tbl_sch_account(email,password) values('test1',md5('111111'));
  insert into test.tbl_sch_account(email,password) values('test2',md5('111111'));
  insert into test.tbl_sch_account(email,password) values('test3',md5('111111'));
  insert into test.tbl_sch_account(email,password) values('test4',md5('111111'));
  insert into test.tbl_sch_account(email,password) values('test5',md5('111111'));
  select * from test.tbl_sch_account;
  show grants;
  show grants for "test"@"$Resserver";
  show grants for "test"@"$GameServer";
  UPDATE mysql.user SET Password=PASSWORD ('password') WHERE User='root';
  QUIT
  QUERY_SQL

页: [1]
查看完整版本: mysql脚本