*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
Ïà¹ØÎĵµ£º
Îȹʶø֪У¬×î½üÓÖÓõ½ÁË£¬²Ý²ÝÄÃÀ´ÎÂϰһϣº×ª×Ô http://www.bccn.net/Article/sjk/mysql/jc/200601/3411.html
MySQL¹ÜÀíÔ±Ó¦¸ÃÖªµÀÈçºÎÉèÖÃMySQLÓû§Õ˺ţ¬Ö¸³öÄĸöÓû§¿ÉÒÔÁ¬½Ó·þÎñÆ÷£¬´ÓÄÄÀïÁ¬½Ó£¬Á¬½ÓºóÄÜ×öʲô¡£MySQL
3.22.11¿ªÊ¼ÒýÈëÁ½ÌõÓï¾äʹµÃÕâÏ×÷¸üÈÝÒ××ö£ºGRANTÓï¾ä´´½¨MySQLÓû§²¢Ö¸¶¨ÆäȨÏÞ£¬¶øREV ......
¼Ù¶¨±ítbl_name¾ßÓÐÒ»¸öPRIMARY KEY»òUNIQUEË÷Òý£¬±¸·ÝÒ»¸öÊý¾Ý±íµÄ¹ý³ÌÈçÏ£º
1¡¢Ëø¶¨Êý¾Ý±í£¬±ÜÃâÔÚ±¸·Ý¹ý³ÌÖУ¬±í±»¸üÐÂ
mysql>LOCK
TABLES READ tbl_name;
¹ØÓÚ±íµÄËø¶¨µÄÏêϸÐÅÏ¢£¬½«ÔÚÏÂÒ»Õ½éÉÜ¡£
2¡¢µ¼³öÊý¾Ý
mysql>SELECT
* INTO OUTFILE ‘tbl_name.bak’ from tbl_name;
3¡¢½âË ......
¡¡1.µ¼³öÕû¸öÊý¾Ý¿â
¡¡¡¡mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
¡¡¡¡2.µ¼³öÒ»¸ö±í
¡¡¡¡mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû ±íÃû> µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u wcnc -p smgp_apps_wcnc users> wcnc_users.sql
¡¡¡¡3.µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹
¡ ......
×î½üʹÓÃrootÓû§±àдÁ˼¸¸ö´æ´¢¹ý³Ì£¬µ«ÊÇʹÓÃÆÕͨÓû§Í¨¹ýJDBCÁ¬½ÓÖ´ÐÐÈ´±¨´í£º
java.lang.NullPointerException......
»ò
java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with " ......
½«ExcelÊý¾Ýµ¼ÈëMySql
1.½«Ñ¡ÖеÄÊý¾Ý¿ì¶ù¿½±´µ½Ò»¸öTXTÎı¾ÎļþÖУ¨¼ÇµÃ°ÑºóÃæµÄ¿Õ¸ñÏûµô¡£¡££©£¬¼ÙÈç´æµ½“D:\data.txt”Õâ¸öλÖÃÀï¡£
2.¸ù¾ÝÒªµ¼ÈëµÄÊý¾Ý¿ì¶ù½¨Á¢MySqlÊý¾Ý¿âºÍ±í£¬È»ºó½øÈëÃüÁîÌáʾ·ûÀïʹÓÃÃüÁî
load data local infile 'D:\data.txt' into table exceltomysql fields terminated ......