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

Linux mysql°²×°ÐÞ¸ÄrootÃÜÂë·þÎñ

ÔÚÏò´ó¼ÒÏêϸ½éÉÜLinux mysql֮ǰ£¬Ê×ÏÈÈôó¼ÒÁ˽âÏÂLinux mysql£¬È»ºóÈ«Ãæ½éÉÜLinux mysql£¬Ï£Íû¶Ô´ó¼ÒÓÐÓá£
1. Linux mysql°²×°£º
$ yum install mysql-server
2. Linux mysqlÐÞ¸ÄrootÃÜÂ룺
$ mysqladmin -u root password
your_new_passwd
3. Æô¶¯Linux mysql·þÎñ
$ /etc/init.d/mysqld start
4. Ìí¼ÓΪϵͳ·þÎñ²¢ËæÖ®×Ô¶¯Æô¶¯£º
$ chkconfig --level 2345 mysqld on
5. Ð޸ķÀ»ðǽ£¬¿ªÆô3306¶Ë¿Ú£¬Ê¹µÃ¿ÉÒÔ½øÐÐÔ¶³Ì·ÃÎÊ£º
System->Administration->Firewall->Other
ports£¬Ìí¼Ó3306¶Ë¿Ú£¬Ò»¶¨Òª°ÑtcpºÍudp¶¼¼ÓÉÏ£¡
Æä±¾ÖÊÊÇÐÞ¸ÄÁË/etc/sysconfig/iptablesÎļþ£¬Ò²¿ÉÖ±½Ó½øÐÐÐ޸ģ¬°´ÕÕÈçϸñʽ£º
-A INPUT -m
state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m
state --state NEW -m tcp -p udp --dport 3306 -j ACCEPT
6. mysqlĬÈϵÄrootÓû§ÊDz»ÄÜÔ¶³Ì·ÃÎʵģ¬ÐèҪΪLinux
mysqlÖÐÌí¼ÓÒ»¸ö¿ÉÒÔÔ¶³Ì·ÃÎʵÄÓû§£¬Ê×ÏÈÒÔrootÓû§µÇ¼Linux mysql£¬È»ºóÔö¼ÓÒ»¸öÓû§£º
GRANT ALL ON *.*
TO your_username@'your_host_name_or_ip_address' IDENTIFIED BY
'your_password'
ÕâÀïµÄALL±íʾ£¬ËùÓÐÈκÎȨÏÞ£¨°üÀ¨Ôöɾ¸ÄµÈ£©£¬*.*±íʾÈκÎÊý¾Ý¿âÖеÄÈÎºÎ±í£¬Ò²¿ÉÖ¸¶¨³ÉLinux
mysqlÖеÄij¸öÊý¾Ý¿âÉõÖÁij¸ö±í£¬¸ÃÓû§µÇ¼ºóÖ»ÄܶԸÃÊý¾Ý¿â½øÐиոո³ÓèµÄ²Ù×÷¡£your_host_name_or_ip_addressÊÇÖ¸¹æ
¶¨ÄãÖ»ÄÜÔÚͨ¹ý¸ÃipµØÖ·Ô¶³Ì·ÃÎÊ£¬Èç¹ûÖ¸¶¨ÈÎÒâµØÖ·¾ù¿É·ÃÎÊ£¬Ôò¿ÉÓÃͨÅä·û%´úÌæ¡£
±ÈÈ磺GRANT insert ON test.*  IDENTIFIED BY
'test'ËüµÄº¬ÒåÊÇ£¬Óû§¿ÉÔÚÈÎÒâIPµØַͨ¹ýÓû§Ãûtest£¬ÃÜÂëtestµÇ¼£¬µÇ¼ºó£¬Ö»ÄܶÔtestÊý¾Ý¿â½øÐÐinsert²Ù×÷¡£
Æä±¾ÖÊÊÇÔÚLinux mysqlÖÐĬÈÏ°üº¬ÁËÒ»¸öLinux
mysqlµÄÊý¾Ý¿â£¬ÆäÖÐÓÐÒ»¸öuser±í£¬ÉÏÊöGRANTÃüÁîÆäʵ¾ÍÊÇÍùÕâ¸ö±íÖÐÌí¼ÓÁËÒ»ÐмǼ¡£Ò²¿ÉÒÔÖ±½ÓÐÞ¸ÄÕâ¸ö±í´ïµ½Í¬ÑùµÄЧ¹û£¬²»¹ý½ÏΪÂé·³¡£
×¢ÒâÌí¼ÓÃÜÂ룬¿ÉÒÔʹÓÃPASSWORD()º¯Êý¡£
7. Ô¶³ÌµÇ¼£¬ÒÔÔÚlinuxÏÂΪÀý£¨windowÏ¿ÉÓÃMysql GUI Tools):
$ mysql -u test -h
192.168.1.111 -p#È»ºóÊäÈëÃÜÂë¼´¿É
8. ½â¾öÊý¾Ý¿â±í²åÈëÖÐÎÄÏÔʾÂÒÂëÎÊÌ⣺
1)ÐÞ¸Ä/etc/my.cnfÎļþ£¬ÕÒµ½[mysqld]£¬ÔÚºóÃæ¼ÓÈëÒÔÏÂÐУº
default-character-set
= utf8
ͬʱн¨Ò»ÏÃûΪ[client]£¬ÔÚÖ®ºó²åÈëͬÉϵÄÓï¾ä¡£ÖØÆôLinux mysql·þÎñ¡£
2)
¶ÔÓÚ´´½¨Êý¾Ý¿âµÄsql½Å±¾£¬ÐèÒª¼ÓÈëÒÔÏÂÓï¾ä£º
drop da


Ïà¹ØÎĵµ£º

mysql µ¼³ö csvÊý¾ÝÃüÁî

µ¼³ö
select field1,field2,field3 from tablename into outfile '/home/output1.csv' fields terminated by ','optionally enclosed by ''lines terminated by '\n';
µ¼Èë
load data local infile '/home/output1.csv' into table tablename fields terminated by ','lines terminated by '\n'(field1,f ......

MYSQL°²×°ÅäÖÃ

ÅäÖãº
binlog:ÓÃÓÚÔöÁ¿±¸·Ý
errorlog:¼à¿Ø´íÎóÐÅÏ¢
slow_query_log:¼à¿Ø²éѯ³¬Ê±µÄSQLÓï¾ä
data directory:Ìá¸ßÐÔÄÜ£¬±ãÓÚ¹ÜÀí
Ñ¡ÔñĬÈÏÊý¾Ý¿âÒýÇæ
INNODBÊý¾Ý¿âÒýÇæµÄÊý¾ÝĿ¼:Ìá¸ßÐÔÄÜ£¬±ãÓÚ¹ÜÀí
log_bin_trust_routine_creators=1 Èç¹û¸´ÖÆϵͳÀïÓÐʹÓõ½Óû§×Ô¶¨Ò庯Êý»ò´æ´¢¹ý³Ì ......

MYSQL±¸·Ý»Ö¸´

ÒòΪMySQL±í±£´æΪÎļþ·½Ê½£¬ºÜÈÝÒ×±¸·Ý¡£ÒªÏë±£³Ö±¸·ÝµÄÒ»ÖÂÐÔ£¬¶ÔÏà¹Ø±íÖ´ÐÐLOCK TABLES²Ù×÷£¬È»ºó¶Ô±íÖ´ÐÐFLUSH TABLES¡£ÄãÖ»ÐèÒª¶ÁËø¶¨£»ÕâÑùµ±Ä㸴ÖÆÊý¾Ý¿âĿ¼ÖеÄÎļþʱ£¬ÔÊÐíÆäËü¿Í»§¼ÌÐø²éѯ±í¡£ÐèÒªFLUSH TABLESÓï¾äÀ´È·±£¿ªÊ¼±¸·ÝÇ°½«ËùÓ줻îµÄË÷ÒýҳдÈëÓ²ÅÌ¡£
±¸·Ý·½·¨£º
A.±¸·ÝµÄÊÇSQL½Å±¾
  & ......

ÍêÈ«Óà GNU/Linux ¹¤×÷


[¾«»ª] ÍêÈ«Óà GNU/Linux ¹¤×÷
http://www.chinaunix.net ×÷Õß:enfuzion  ·¢±íÓÚ£º2005-12-08 16:05:56
¡¾·¢±íÆÀÂÛ¡¿¡¾²é¿´Ô­ÎÄ¡¿¡¾LinuxÌÖÂÛÇø¡¿¡¾¹Ø±Õ¡¿
ת×Ôhttp://www.chinaunix.net/jh/4/16102.html
ÍêÈ«ÓàGNU/Linux ¹¤×÷
— ±÷Æú Windows µÍЧÂʵŤ×÷·½Ê½£¬·¢¾ò&n ......

LinuxÄÚºËÄ£¿éµÄ¹ÜÀí

Ò»¡¢LinuxÄÚºËÄ£¿éµÄ¹ÜÀí
 
 
1¡¢lsmod ÁмÓÒÔ¹ÒÔصÄÄÚºËÄ£¿é£»
 
lsmod ÊÇÁгöĿǰϵͳÖÐÒѼÓÔصÄÄ£¿éµÄÃû³Æ¼°´óСµÈ£»ÁíÍâÎÒÃÇ»¹¿ÉÒԲ鿴 /proc/modules £¬ÎÒÃÇÒ»Ñù¿ÉÒÔÖªµÀϵͳÒѾ­¼ÓÔصÄÄ£¿é£»
´úÂë:
[root@localhost beinan]# lsmod
2¡¢modinfo ²é¿´Ä£¿éÐÅÏ¢£»
 
modinfo ¿ÉÒԲ鿴ģ¿éµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ