./mysqlbackup_mxxy.sh
---------------------------
10-12-31 10:20:25
---------------------------
db101231am.sql
[db1012311020.tar.gz]Backup Success!
[root@urgdl11 shell]# ./mysqlbackup_ssxw.sh
---------------------------
10-12-31 10:20:57
---------------------------
mysqldump: Got error: 1045: Access denied for user 'admin_ssxw'@'%' (using password: YES) when using LOCK TABLES
db101231am.sql
[db1012311020.tar.gz]Backup Success!
[root@urgdl11 shell]# vim mysqlbackup_ssxw.sh
[root@urgdl11 shell]# mysql -uadmin_ssxw -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 795
Server version: 5.1.46-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| daily_ssxw |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> exit
Bye
[root@urgdl11 shell]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 796
Server version: 5.1.46-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all privileges on daily_ssxw.* to admin_ssxw@"localhost" identified by 'daily1523';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@urgdl11 shell]# ./mysqlbackup_ssxw.sh
---------------------------
10-12-31 10:27:03
---------------------------
mysqldump: Got error: 1045: Access denied for user 'admin_ssxw'@'localhost' (using password: YES) when using LOCK TABLES
db101231am.sql
[db1012311027.tar.gz]Backup Success!
[root@urgdl11 shell]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 798
Server version: 5.1.46-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all privileges on *.* to admin_ssxw@"localhost" identified by 'daily1523';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@urgdl11 shell]# ./mysqlbackup_ssxw.sh
---------------------------
10-12-31 10:28:09
---------------------------
mysqldump: Got error: 1449: The user specified as a definer ('admin'@'%') does not exist when using LOCK TABLES
db101231am.sql
[db1012311028.tar.gz]Backup Success!
======================================
grant all privileges on *.* to admin@"%" identified by 'daily1523';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)