MySQL Reference ManualÖÐÎÄ°æ
MySQL Reference Manual for version 4.1.0-alpha.
¡¡ÒëÕßÐò
¡¡ÁÐÀàÐÍÓ뺯ÊýË÷Òý
6 MySQL ÓïÑԲο¼
6.1 ÓïÑԽṹ
6.1.1 ÎÄ×Ö£ºÔõôд×Ö·û´®ÓëÊý×Ö
6.1.1.1 ×Ö·û´®
6.1.1.2 Êý×Ö
6.1.1.3 Ê®Áù½øÖÆÖµ
6.1.1.4 NULL
Öµ
6.1.2 Êý¾Ý¿â¡¢±í¡¢Ë÷Òý¡¢ÁкͱðÃû
6.1.3 Ãû×ֵĴóСдÃô¸ÐÐÔ
6.1.4 Óû§±äÁ¿
6.1.5 ϵͳ±äÁ¿
6.1.6 ×¢Ê;䷨
6.1.7 MySQL ¶Ô±£Áô×ÖÌôÌÞÂð£¿
6.2 ÁÐÀàÐÍ
6.2.1 Êý×ÖÀàÐÍ
6.2.2 Date ºÍ Time ÀàÐÍ
6.2.2.1 Y2K ÎÊÌâºÍÈÕÆÚÀàÐÍ
6.2.2.2 DATETIME¡¢DATE ºÍ TIMESTAMP ÀàÐÍ
6.2.2.3 TIME ÀàÐÍ
6.2.2.4 YEAR ÀàÐÍ
6.2.3 ×Ö·û´®ÀàÐÍ
6.2.3.1 CHAR ºÍ VARCHAR ÀàÐÍ
6.2.3.2 BLOB ºÍ TEXT ÀàÐÍ
6.2.3.3 ENUM ÀàÐÍ
6.2.3.4 SET ÀàÐÍ
6.2.4 ΪÁÐÑ¡ÔñÕ
Ïà¹ØÎĵµ£º
access denied for user 'root'@'localhost' (using password: YES);
½ñÌìÓÃmysqlµÄʱºò£¬µÇ¼µÄʱºò³öÏÖÁËÕâ¾ä£¬²»ÖªµÀÊÇʲôÒâ˼£¬ÒòΪÎÒµÄmysqlÊÇ×°centosµÄʱºòÒ»Æð×°µÄ£¬ÃÜÂëÎÒ¾ÍÊäÈëÎÒµÄÕÊ»§ÃÜÂ룬½á¹û³öÏÖÁËÉÏÃæÄǾ䣻°Ù¶ÈÁËһϣ¬»¹Õæ²»ÉÙÈ˳öÏÖÁËÕâ¸öÎÊÌâ¡£¡£×îºóÎÒÕÒµ½ÁË·½·¨£»
[root@localhost home]# mysql - ......
Íü¼ÇMySQL ROOTÃÜÂëÊÇÔÚMySQLʹÓÃÖкܳ£¼ûµÄÎÊÌ⣬¿ÉÊÇÓкܶàÅóÓѲ¢²»»áÖØÖÃROOTÃÜÂ룬Äǽпడ£¬ÎÒÓÐÉîÓид¥£¬ÌØд´ËÎÄÕÂÓë´ó¼Ò½»Á÷£º
1¡¢±à¼MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ÅäÖÃÎļþ£º
windows»·¾³ÖУº%MySQL_installdir%\my.ini
//Ò»°ãÔÚMySQL°²×°Ä¿Â¼ÏÂÓÐmy.ini¼´MySQLµÄÅäÖÃÎļþ¡£
linux»·¾³ÖУº/etc/my.cnf ......
ÍêÈ«°²×°°ü
http://mysql.isu.edu.tw/Downloads/MySQL-5.1/mysql-5.1.38-win32.msi
°üº¬ÁË°²×°MySQLËùÐèÒªµÄÈ«²¿ÎļþÓëÅäÖÃÏòµ¼ÒÔ¼°¿ÉÑ¡×é¼þ£¬Èç»ù×¼Ì×¼þºÍǶÈëʽ·þÎñÆ÷
»ù±¾°²×°°ü
http://mysql.isu.edu.tw/Downloads/MySQL-5.1/mysql-essential-5.1.38-win32.msi
Ö»°üº¬ÁË°²×°MySQLËùÐèÒªµÄ»ù±¾ÎļþÓëÅäÖÃÏòµ¼£¬µ«ÊÇ ......
mysql>use mysql;
mysql>update user set host='%' where user='root';
ÖØÆôMysql
sudo /etc/init.d/mysql restart
[sudo] password for wangzw:
*Stopping MySQL database server mysqld & ......
mysql ´ó¶ÔÏó´æÈ¡:
¡¡¡¡ÀàÐÍÒ»°ãÓ¦¸ÃÓÃmediumblod,
¡¡¡¡blobÖ»ÄÜ´æ2µÄ16´Î·½¸öbyte,
¡¡¡¡mediumblodÊÇ24´Î·½,
¡¡¡¡Ò»°ãÀ´Ëµ¹»ÓÃÁË.longblobÊÇ32´Î·½ÓÐЩ´ó.
¡¡¡¡MYSQLĬÈÏÅäÖÃÖ»ÄÜ´æ1M´óСµÄÎļþ,ÒªÐÞ¸ÄÅäÖÃ,WIN°æ±¾µÄÔÚmysql.iniÎļþÖÐ
¡¡¡¡ÐÞ¸Ämax_allowed_packet,net_buffer_lengthµÈ¼¸¸ö²ÎÊý,»òÖ±½ÓSET GLOBAL va ......