Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

mysql³£ÓÃÃüÁî

mysql³£ÓÃÃüÁî 
  
¹Ø±ÕÊý¾Ý¿â
/data01/mysql/bin/mysqladmin -p shutdown
µ¼³öÊý¾Ý¿â
/usr/local/mysql/bin/mysqldump -opt -uroot -p -h10.15.0.45 bbsdb > 20070918.bbsdb.sql
µ¼ÈëÊý¾Ý¿â
/usr/local/mysql/bin/mysql target_db_name < backup-file.sql
ÏÞÖÆÖ»ÓÐÄÚ²¿ip¿ÉÒÔÁ´½Ó
/usr/local/mysql/bin/mysqld_safe --bind-address=10.15.0.72 &
Êý¾Ý¿â°²×°
./configure --prefix=/usr/local/mysql --with-charset=gbk --with-collation=gbk_chinese_ci
Êý¾Ý¿âÐÞ±í
/usr/local/mysql/bin/myisamchk --safe-recover table_name
¸ü¸ÄmysqlÓû§ÃÜÂ룺
mysql -h 10.15.11.2 -u root -p
Enter password: ********
ERROR 1130 (00000): Host '10.15.11.2' is not allowed to connect to this MySQL server
½â¾ö°ì·¨£¬ÔÚ10.15.11.2»úÆ÷ÉÏÖ´ÐÐ
mysql>grant all on *.* to root@'%' identified by 'yourpassword';
mysql>flush privileges; //Ë¢ÐÂȨÏÞ
##########################################
mysql±¸·Ý½Å±¾
#!/bin/sh
BACK_HOME="/server/back/www.test_db" ####±¸·Ý¿â·Åµ½µÄĿ¼
MYSQLDUMP="/server/mysql/bin/mysqldump" ###ÃüÁî
MYSQLCMD="/server/mysql/bin/mysql"
DB_NAME_LIST_FILE="/server/back/www.test_db/dbnamelist" ###¿âÁбí
##########
TAR="/bin/tar"
MYSQL_SERVER="10.15.0.52" ###Òª±¸·ÝÖ÷»úipµØÖ·
###µ¼Êý¾Ý¿âÁбí
$MYSQLCMD -uzhp -p12345 -h $MYSQL_SERVER </root/showdbcmd.sql>$DB_NAME_LIST_FILE
############
TODAY=`date +%Y%m%d`
MONTH=`date "+%d"`
WEEK=`date "+%w"`
##################
cd $BACK_HOME
for i in `cat $DB_NAME_LIST_FILE`
do
if [ $i != "Database" ]
then
echo "start $i..."
$MYSQLDUMP -Q -uzhp -p12345 -h $MYSQL_SERVER $i >$TODAY.$i.sql && echo "$TODAY.$i.sql good" >>mail.txt ####µ¼¿âÃüÁî
fi
done
echo "start tar...."
$TAR cvzfp $TODAY.db.test.sql.tar.gz *.sql && echo "$TODAY smsdbgood" >> mail.txt
cd $BACK_HOME
rm -rf *.sql
###########################
A.my.cnfÅäÖÃ
±¾ÎÄÖеÄÅäÖö¼ÊÇ´Ó¡¶MySQL5ȨÍþÖ¸ÄÏ(3rd)¡·ÖÐÕª³­³öÀ´µÄ£¬¸öÈËÈÏΪ¶ÔÓÚʹÓÃMySQLÊ®·ÖÓÐÓ᣷ÅÔÚ´Ë´¦·½±ã×Ô¼ºËæʱ²éÔÄ£¬Ò²Ï£Í


Ïà¹ØÎĵµ£º

ÈçºÎд³ö¸ßÐÔÄܵÄMySQL²éѯ

ÏëдÕâÑùһƪÎÄÕºܾÃÁË£¬µ«Ê¼ÖÕûÓÐÏÂÊÖ¡£×î½ü°ïͬÊ¿´Á˼¸¸ö²éѯ£¬¶øÇÒ×Ô¼ºÒ²ÔÚ¿¼ÂÇÒ»¸öË÷ÒýϵͳµÄÎÊÌ⣬ËùÒÔ½ñÌì¾Í°ÑÕâ¸öдÁË¡£½éÉÜÒ»ÏÂMySQLµÄË÷Òý»úÖÆ£¬»¹ÓÐһЩMySQL²éѯµÄÓÅ»¯²ßÂÔ¡£±ÉÈ˲ÅÊèѧdz£¬ºÜ¿ÉÄÜ˵µÄ²»¶Ô£¬Çë·¹ýµÄ¸÷λ´óÏÀÅúÆÀÖ¸Õý£¬Ï׳óÁË¡£
------------------- jiajun.org ¹Ù·½·Ö¸îÏß ---------------- ......

MySQL´¥·¢Æ÷

MySQL´¥·¢Æ÷
Ò»¡¢ MySQL´¥·¢Æ÷¸ÅÄî
MySQL5.0ÒÔÉÏ°æ±¾Ö§³Ö´¥·¢Æ÷£¬´¥·¢Æ÷ÊÇÓë±íÓйصÄÃüÃûÊý¾Ý¿â¶ÔÏ󣬵±±í³öÏÖÌض¨Ê¼þʱ£¬½«¼¤»î¸Ã¶ÔÏó¡£
¶þ¡¢ MySQL´¥·¢Æ÷Óï·¨
CREATE TRIGGER trigger_name trigger_time trigger_event
       ON tbl_name FOR EACH ROW trigger_stmt
trigger ......

MySQL Ëæ±Ê

1, MySQL profiling
 mysql> set profiling = 1;
 mysql> select count(*) from test;
 mysql> show profiles;
 mysql> show profile for query 1;
2,mysql ¼à¿Ø
http://bbs.linuxtone.org/thread-1854-1-1.html
http://code.google.com/p/mysql-cacti-templates/   -> Hig ......

MySQLѧϰ±Ê¼Ç

mysql·þÎñÆ÷°²×°ÅäÖãº
1. sudp apt-get install mysql-server-5.0
2. ´´½¨¿âsecond_proxy, ΪsecProxyÌí¼ÓÓû§£ºgrant all privileges on second_proxy.* to secProxy@'%' identified by 'passwd';
3. ÉèÖÃmysql.user±íÈçÏ£º
+-----------+------------------+-------------------------------------------+
| Host& ......

ÔõôÑùÐÞ¸Ämysqlµ¼ÈëÎļþ´óСÏÞÖÆ

×Ô¼ºµçÄÔÉÏ×°µÄWAMP£¬ÔÚµ¼ÈëÊý¾Ý¿â±È½Ï´ó£¨´óÓÚ2M£©Ê±Óöµ½´íÎ󣬲»Äܵ¼Èë¡£
ÕÒµ½½â¾ö·½·¨£º php.iniÅäÖÃÎļþÖÐÓÐÈý´¦µØ·½ÐèÒª¸Ä¶¯£º
upload_max_filesize
memory_limit
post_max_size
ÕâÈý¸öÖµ¶¼¹¤¾ßʵ¼ÊÇé¿ö¸ÄÏ£¬ÖØÆô·þÎñÆ÷ÒÔºó£¬ËäÈ»µ¼ÈëʱÈÔÈ»ÏÔʾÊÇ ×î´óÏÞÖÆ£º2,048 KB) £» µ«Êµ¼ÊÉÏÒѾ­¿ÉÒÔµ¼ÈëºÜ´óµÄÊý¾Ý¿â ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ