*nix»·¾³ÏÂÔ´Âë±àÒë°²×°mysql
ΪʲôѡÔñÔ´Âë±àÒë°²×°mysql£ºÎÒÔÚʹÓÃrpm»òÕßÊÇyum°²×°Ê±myql£¬ÀÏÊÇÌáʾÎÒÕÒ²»µ½*.sockÎļþ£¬ÕÒÁ˵ã
×ÊÁÏ˵ÊǸðüÊǷǹٷ½°æ±¾£¨Ã÷Ã÷Êǹٷ½ÏÂÔØ µÄ£©£¬ÆäÖÐÔÒòµ½ÏÖÔÚ»¹Ã»ÓиãÇå³þ¡£Ï£ÍûÖªÇéÈËÊ¿¸æÖª¡££¨¿ªÊ¼±àÒëµÄʱºò£¬ÏµÍ³»·¾³Ò»¶¨ÒªÅäÖúã¬GCC£¬GC++...µÈµÈµÄ±àÒëÆ÷Ò»¶¨Òª×öºÃ,±¾È˵ÄcentosÓÉÓÚ¿ªÊ¼
ϵͳ»·¾³Ã»ÅäÖúã¬gccµÈµÈ»·¾³Ã»×öºÃ£¬ÔÚ±àÒ밲װʱ£¬×ßÁ˺ܶàÍä·£¬Ê¼ÖÕ²»ÄÜÉú³Émakefile¡£ÓôÃÆ£©
1¡¢ÏÂÔØÔ´Âë°ü
È¥ http://dev.mysql.com/downloads/mysql/6.0.html ÀïÏÂÔص½ mysql-6.0.6-alpha.tar.gz
2¡¢´´½¨mysqlµÄÓû§×éºÍÓû§
>groupadd mysql
>useradd -g mysql mysql
3¡¢±àÒë°²×° mysql
>cp mysql-6.0.0-alpha.tar.gz /usr/local/src
>tar -zxvf mysql-6.0.0-alpha.tar.gz
>cd mysql-6.0.0-alpha
>./configure --prefix=/usr/local/mysql #Ö¸¶¨°²×°Ä¿Â¼
>make
>make install
ÔÚ±àÒëMysqlʱ
./configure prefix=/usr/local/mysql
Èç¹û³öÏÖÁËÒÔÏ´íÎó£º
......
checking for tgetent in -ltermcap... no
checking for termcap functions library... configure: error: No curses/termcap library found
˵Ã÷ curses/termcap ¿âûÓа²×°
yum search curses | grep lib
°²×° ncurses-devel £¬È»ºóÖØÐÂÔËÐÐÅäÖÃ
yum install ncurses-devel
4¡¢ÅäÖò¢Æô¶¯mysql
>cp support-files/my-medium.cnf /etc/my.cnf
>cd /usr/local/mysql
>chown -R mysql .
>chgrp -R mysql .
>bin/mysql_install_db --user=mysql #³õʼ»¯°²×°mysqlÊý¾Ý¿â
>chown -R root .
>chown -R mysql var
>bin/mysqld_safe --user=mysql &
5¡¢¸ü¸ÄmysqlµÄrootÃÜÂë
>/usr/local/mysql/bin/mysqladmin -u root password [ÐÂÃÜÂë]
6¡¢ÉèÖÃmysql¿ª»ú×ÔÆô¶¯
>cp support-files/mysql.server /etc/rc.d/init.d/mysql
>chmod +x /etc/rc.d/init.d/mycql
>chkconfig --add mysql
>service mysql start
Ïà¹ØÎĵµ£º
ÈçºÎµ¼Èë.sqlÎļþµ½mysqlÖУ¿
C:\mysql\bin>mysql -u Óû§Ãû -p Êý¾Ý¿âÃû < c:/test.sql (source "c:\adsense.sql" )
ÖмäµÄ¿Õ¸ñÊÇÒ»¸ö¿Õ¸ñλ¡£
ͬʱʹÓÃ200¶àMBµÄsqlÎļþ¡£
ÀýÈ磺
C:\Program Files\MySQL\bin>mysql -u root -p myrosz & ......
Ê×ÏÈ·ÖÎöÂÒÂëµÄÇé¿ö
1.дÈëÊý¾Ý¿âʱ×÷ΪÂÒÂëдÈë
2.²éѯ½á¹ûÒÔÂÒÂë·µ»Ø
¾¿¾¹ÔÚ·¢ÉúÂÒÂëʱÊÇÄÄÒ»ÖÖÇé¿öÄØ£¿
ÎÒÃÇÏÈÔÚmysql ÃüÁîÐÐÏÂÊäÈë
show variables like '%char%';
²é¿´mysql ×Ö·û¼¯ÉèÖÃÇé¿ö:
mysql> show variables like '%char%';
+--------------------------+---------------------------------------- ......
¡¡ÍøÉÏÓкܶàµÄÎÄÕ½ÌÔõôÅäÖÃMySQL·þÎñÆ÷£¬µ«¿¼Âǵ½·þÎñÆ÷Ó²¼þÅäÖõIJ»Í¬£¬¾ßÌåÓ¦ÓõIJî±ð£¬ÄÇЩÎÄÕµÄ×ö·¨Ö»ÄÜ×÷Ϊ³õ²½ÉèÖòο¼£¬ÎÒÃÇÐèÒª¸ù¾Ý×Ô¼ºµÄÇé¿ö½øÐÐÅäÖÃÓÅ»¯£¬ºÃµÄ×ö·¨ÊÇMySQL·þÎñÆ÷Îȶ¨ÔËÐÐÁËÒ»¶Îʱ¼äºóÔËÐУ¬¸ù¾Ý·þÎñÆ÷µÄ”״̬”½øÐÐÓÅ»¯¡£
mysql> show global status;
¡¡¡¡¿ÉÒÔÁгöMySQL·þÎ ......
½«ExcelÊý¾Ýµ¼ÈëMySql
1.½«Ñ¡ÖеÄÊý¾Ý¿ì¶ù¿½±´µ½Ò»¸öTXTÎı¾ÎļþÖУ¨¼ÇµÃ°ÑºóÃæµÄ¿Õ¸ñÏûµô¡£¡££©£¬¼ÙÈç´æµ½“D:\data.txt”Õâ¸öλÖÃÀï¡£
2.¸ù¾ÝÒªµ¼ÈëµÄÊý¾Ý¿ì¶ù½¨Á¢MySqlÊý¾Ý¿âºÍ±í£¬È»ºó½øÈëÃüÁîÌáʾ·ûÀïʹÓÃÃüÁî
load data local infile 'D:\data.txt' into table exceltomysql fields terminated ......
http://blog.c1gstudio.com/archives/602
nagios_plugin°²×°Ê±ÕýÈ·¹ØÁªmysqlºó»áÔÚlibexecϲúÉúcheck_mysqlÎļþ
/usr/local/nagios/libexec/check_mysql -h
check_mysql v2034 (nagios-plugins 1.4.13)
Copyright (c) 1999-2007 Nagios Plugin Development Team
< ......