mysql¾ÖÓòÍø·ÃÎÊ
1,ÔÚwindow×Ô´øµÄ·À»ðǽÀïµÄÀýÍâÌí¼Ó3306¶Ë¿Ú£¬ÎªTCP
2£¬½ñÌìÔÚÓÃÔ¶³ÌÁ¬½ÓMysql·þÎñÆ÷µÄÊý¾Ý¿â£¬²»¹ÜÔõôŪ¶¼ÊÇÁ¬½Ó²»µ½£¬´íÎó´úÂëÊÇ1130£¬ERROR 1130: Host 192.168.2.159 is not allowed to connect to this MySQL server
²ÂÏëÊÇÎÞ·¨¸øÔ¶³ÌÁ¬½ÓµÄÓû§È¨ÏÞÎÊÌâ¡£½á¹ûÕâÑù×Ó²Ù×÷mysql¿â£¬¼´¿É½â¾ö¡£ÔÚ±¾»úµÇÈëmysqlºó£¬¸ü¸Ä “mysql” Êý¾Ý¿âÀïµÄ “user” ±íÀïµÄ “host” Ï´Ó”localhost”¸Ä³Æ'%'¡£¡£
mysql -u root -p
mysql>use mysql;
mysql>select 'host' from user where user='root';
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select 'host' from user where user='root';
µÚÒ»¾äÊÇÒÔȨÏÞÓû§rootµÇ¼
µÚ¶þ¾ä£ºÑ¡Ôñmysql¿â
µÚÈý¾ä£º²é¿´mysql¿âÖеÄuser±íµÄhostÖµ£¨¼´¿É½øÐÐÁ¬½Ó·ÃÎʵÄÖ÷»ú/IPÃû³Æ£©
µÚËľ䣺ÐÞ¸ÄhostÖµ£¨ÒÔͨÅä·û%µÄÄÚÈÝÔö¼ÓÖ÷»ú/IPµØÖ·£©£¬µ±È»Ò²¿ÉÒÔÖ±½ÓÔö¼ÓIPµØÖ·
µÚÎå¾ä£ºË¢ÐÂMySQLµÄϵͳȨÏÞÏà¹Ø±í
µÚÁù¾ä£ºÔÙÖØв鿴user±íʱ£¬ÓÐÐ޸ġ£¡£
ÖØÆðmysql·þÎñ¼´¿ÉÍê³É¡£
Ïà¹ØÎĵµ£º
mysql ´ó¶ÔÏó´æÈ¡:
ÀàÐÍÒ»°ãÓ¦¸ÃÓÃmediumblod,
blobÖ»ÄÜ´æ2µÄ16´Î·½¸öbyte,
mediumblodÊÇ24´Î·½,
Ò»°ãÀ´Ëµ¹»ÓÃÁË.longblobÊÇ32´Î·½ÓÐЩ´ó.
MYSQLĬÈÏÅäÖÃÖ»ÄÜ´æ1M´óСµÄÎļþ,ÒªÐÞ¸ÄÅäÖÃ,WIN°æ±¾µÄÔÚmysql.iniÎļþÖÐ
ÐÞ¸Ämax_allowed_packet,net_buffer_lengthµÈ¼¸¸ö²ÎÊý,»òÖ±½ÓSET GLOBAL varName=value.
linux°æ± ......
Love in coding...
Free and Susan
[Òý]MySQL INNODBÀàÐͱíµÄÍâ¼ü¹ØÁªÉèÖÃ
Here is a simple example that relates parent and child tables through a single-column foreign key:
CREATE TABLE parent (id INT NOT NULL,
......
Á˽âÁËһЩ×î»ù±¾µÄ²Ù×÷ÃüÁîºó£¬ÎÒÃÇÔÙÀ´Ñ§Ï°ÈçºÎ´´½¨Ò»¸öÊý¾Ý¿âºÍÊý¾Ý¿â±í¡£
¡¡¡¡1¡¢Ê¹ÓÃSHOWÓï¾äÕÒ³öÔÚ·þÎñÆ÷Éϵ±Ç°´æÔÚʲôÊý¾Ý¿â£º
mysql> SHOW DATABASES; +----------+
| Database | +----------+ | mysql |
| test | +----------+ 3 rows in set (0.00 sec)
¡¡¡¡2¡¢´´½¨Ò»¸öÊý¾Ý¿âabccs
¡¡¡¡mysql> ......
Ò»¡¢µ¼³öÊý¾Ý¿âÓÃmysqldumpÃüÁעÒâmysqlµÄ°²×°Â·¾¶£¬¼´´ËÃüÁîµÄ·¾¶£©£º
1¡¢µ¼³öÊý¾ÝºÍ±í½á¹¹£º
mysqldump -uÓû§Ãû -p Êý¾Ý¿âÃû > Êý¾Ý¿âÃû.sql
#/usr/local/mysql/bin/mysqldump -uroot -p abc > abc.sql
Çûسµºó»áÌáʾÊäÈëÃÜÂë
2¡¢Ö»µ¼³ö±í½á¹¹
mysqldump -uÓû§Ãû -p -d Êý¾Ý¿âÃû > Êý¾Ý¿âÃû.sql
# ......
ÒÔÏÂת×Ô Osss.cn Óʼþ£¬ÇëʹÓùý¡¢ÕýÔÚʹÓûòÕßÖ§³Ö¿ªÔ´µÄÅóÓÑÖ§³ÖÒ»ÏÂMySql£¬Ð»Ð»¡£
ҲϣÍû½ÌÓý²¿¡¢¿Æ¼¼²¿¸øÓèÖ±½ÓÖ§³Ö£¡
´ó¼ÒºÃ£º½ñÌì¿´µ½ÕâÔòÐÂÎÅ£¬Óë´ó¼Ò¹²Ïíһϣ¬MySQL´´Ê¼ÈËÏ£ÍûÖйúÉÌÎñ²¿ÄܽéÈëOracle&SunÊÕ¹º°¸£¬ºÃÏñ²¢Ã»ÓÐʵÖʽøÕ¹¡£¶ø¶íÂÞ˹Áª°î·´Â¢¶Ï»ú¹¹ÔÚÉÏÖÜÕ¹¿ªµ÷²é¡£Èç¹ûÐèÒªÉÌÎñ² ......