Chinaunix首页 | 论坛 | 博客
  • 博客访问: 217282
  • 博文数量: 53
  • 博客积分: 2059
  • 博客等级: 大尉
  • 技术积分: 577
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-30 03:03
文章分类
文章存档

2012年(4)

2011年(19)

2010年(30)

分类: Mysql/postgreSQL

2011-01-21 13:33:33

./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)
阅读(1345) | 评论(0) | 转发(0) |
0

上一篇:又一次粗心的记录

下一篇:nagios使用技巧

给主人留下些什么吧!~~