½â¾öMySQL²»ÔÊÐí´ÓÔ¶³Ì·ÃÎʵķ½·¨
½â¾öMySQL²»ÔÊÐí´ÓÔ¶³Ì·ÃÎʵķ½·¨
2009-06-04 13:11
1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
Sql´úÂë ¸´ÖÆ´úÂë
1. mysql -u root -pvmwaremysql>use mysql;
2. mysql>update user set host = '%' where user = 'root';
3. mysql>select host, user from user;
mysql -u root -pvmwaremysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
2. ÊÚȨ·¨¡£ÀýÈ磬ÄãÏëmyuserʹÓÃmypassword´ÓÈκÎÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷µÄ»°¡£
Sql´úÂë ¸´ÖÆ´úÂë
1. GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WI
2. TH GRANT OPTION;
3. FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WI
TH GRANT OPTION;
FLUSH PRIVILEGES;
Èç¹ûÄãÏëÔÊÐíÓû§myuser´ÓipΪ192.168.1.6µÄÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷£¬²¢Ê¹ÓÃmypassword×÷ΪÃÜÂë
Sql´úÂë ¸´ÖÆ´úÂë
1. GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY
2. 'mypassword' WITH GRANT OPTION;
3. FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY
'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Èç¹ûÄãÏëÔÊÐíÓû§myuser´ÓipΪ192.168.1.6µÄÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷µÄdkÊý¾Ý¿â£¬²¢Ê¹ÓÃmypassword×÷ΪÃÜÂë
Sql´úÂë ¸´ÖÆ´úÂë
1. GRANT ALL PRIVILEGES ON dk.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY
2. 'mypassword' WITH GRANT OPTION;
3. FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON dk.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY
'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
×¢ÒâÊÚȨºó±ØÐëFLUSH PRIVILEGES;·ñÔòÎÞ·¨Á¢¼´ÉúЧ¡£
ÁíÍâÒ»ÖÖ·½·¨.
ÔÚ°²×°mysqlµÄ»úÆ÷ÉÏÔËÐУº
1
Ïà¹ØÎĵµ£º
MySQLʶ±ðÏÂÁÐתÒå×Ö·û£º
\0
Ò»¸öASCII 0 (NUL)×Ö·û¡£
\n
Ò»¸öÐÂÐзû¡£
\t &nb ......
²î²»¶àÔÚÒ»ÄêÇ°£¬Ð´¹ýһƪÎÄÕ½éÉܽ«MySQLÊý¾ÝÓ³Éäµ½Memcached£¬µ±Ê±MySQLºÍMemcached Functions for MySQL¶¼»¹²»¹»³ÉÊ죬ʱ¹ýÒ»Ä꣬Memcached Functions for MySQLÉý¼¶µ½ÁË0.8°æ±¾£¬¶øMySQLÒ²·¢²¼ÁËGA°æ±¾£¬¼ÓÉϺܶàÅóÓÑ·´Ó¦Ç°Ò»ÆªÎÄÕÂÖеÄʵÏÖËûÃÇÒòÖÖÖÖÔÒòûÄܳɹ¦£¬ÓÚÊDZãÓÐÁËÕâƪÎÄÕ£¬¾Íµ±ÊÇÉÏһƪÎÄÕµÄÉý¼¶°æ±¾°É¡ ......
C APIÏà¹Ø
C APIÊý¾ÝÀàÐÍ
MYSQL
¸Ã½á¹¹´ú±í1¸öÊý¾Ý¿âÁ¬½ÓµÄ¾ä±ú¡£¼¸ºõËùÓеÄMySQLº¯Êý¾ùʹÓÃËü¡£²»Ó¦³¢ÊÔ¿½±´MYSQL½á¹¹¡£²»±£Ö¤ÕâÀ࿽±´½á¹û»áÓÐÓá£
MYSQL_RES
¸Ã½á¹¹´ú±í·µ»ØÐеIJéѯ½á¹û£¨SELECT, SHOW, DESCRIBE, EXPLAIN£©¡£ÔÚ±¾½ÚµÄÊ£Óಿ·Ö£¬½«²éѯ·µ»ØµÄÐÅÏ¢³ÆΪ“½á¹û¼¯&rdq ......
Òª°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñÆ÷ÊÇ·ñÕýÔÚÔËÐУº ......