MysqlÊý¾Ý±¸·ÝÒÔ¼°ÒìµØ´æ´¢
ÕûÀítuscany.org.cnµÄ·þÎñÆ÷£¬·¢ÏÖ3ÄêǰдµÄ½Å±¾»¹ÔÚÅÜ×Å :)
½Å±¾ÈçÏ£º
#==========================================================
#!/bin/bash
current_date=`date +%Y-%m-%d:%H:%M:%S`
/usr/local/mysql/bin/mysqldump -prootpass dbname1 > ./DB_DIR/dbname1_"$current_date"_dump_file.sql
/usr/local/mysql/bin/mysqldump -prootpass dbname2 > ./DB_DIR/dbname2_"$current_date"_dump_file.sql
scp /root/DB_DIR/dbname1_"$current_date"_dump_file.sql sca@172.90.91.92:/root/DBBakDir
scp /root/DB_DIR/dbname2_"$current_date"_dump_file.sql sca@172.91.92.93:/root/DBBakDir
if [ $? -ne 0 ]
then
mail -s "Warning mesage from the automating backup program of tuscany.org.cn" wanghongwei@myce.net.cn < mailcontext.txt
fi
#==========================================================
mailcontext.txtµÄÄÚÈÝ
==================================
TuscanyÊý¾Ý±¸·Ý³ö´í£¬Ç뾡¿ì²é¿´ÔÒò²¢½â¾ö£¡
Ïà¹ØÎĵµ£º
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
//===========================================
// ³ÌÐò£º mysql-Based Session Class
// ¹¦ÄÜ£º »ùÓÚmysql´æ´¢µÄ Session ¹¦ÄÜÀà
// ×÷Õß: yejr
// ÍøÕ¾: http://imysql.cn
// ʱ¼ä: 2007- ......
drop table student;
create table student
(sno int not null unique,
sname varchar(8) not null,
ssex char(2) not null,
sage int ,
sdept varchar(20));
select * from student;
alter table student drop uniq ......
mysqlϵļÓÃܺ¯ÊýÓÐÈçϼ¸¸ö
PASSWORD()£º´´½¨Ò»¸ö¾¹ý¼ÓÃܵÄÃÜÂë×Ö·û´®£¬ÊʺÏÓÚ²åÈëµ½MySQLµÄ°²È«Ïµ
ͳ¡£¸Ã¼ÓÃܹý³Ì²»¿ÉÄæ£¬ºÍunixÃÜÂë¼ÓÃܹý³ÌʹÓò»Í¬µÄËã·¨¡£Ö÷ÒªÓÃÓÚMySQLµÄÈÏ֤ϵͳ¡£
ENCRYPT(£¬)£ºÊ¹ÓÃUNIX crypt()ϵͳ¼ÓÃÜ×Ö·û´®£¬ENCRYPT()º¯Êý½ÓÊÕÒª¼ÓÃܵÄ×Ö·û´®ºÍ£¨¿ÉÑ¡µÄ£©ÓÃÓÚ¼ÓÃܹý³ÌµÄsalt£¨Ò»¸ ......
ÔÎÄת×Ô:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql¿ªÆôÈÕÖ¾
2008-11-18 11:23
ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_bin';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001(Ҫд¾ø¶ÔÎÊÌâ ......