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

ubuntuÉÏmysql´´½¨Óû§¼°ÆôÓÃ

³õʼµÇ¼mysql,ʹÓÃrootÕʺÅ,Ö®ºóÑ¡Ôñuse mysql,ʹÓÃmysqlÊý¾Ý¿â.
È»ºóselect user from user;
¿ÉÒÔ¿´µ½ÏÖÓÐÓû§.
È»ºóÓÃÃüÁî create user paul identified by 'newpasswd';
paulÊÇÓû§Ãû,newpasswdÊÇÐÂÃÜÂë
ÔÙÓÃshow grants for paul; ¿ÉÒÔ¿´µ½paulÓû§µÄȨÏÞ;
¿ÉÒÔ¿´µ½GRANT USAGE ON *.* TO 'paul'@'%'
Õâ¸ö˵Ã÷paulÓû§Ã»ÓÐÈκÎȨÏÞ
½ÓÏÂÀ´¼ÌÐø¸øpaulÓû§ÊÚȨ
grant all on PaulDataBase.* to paul;
°ÑPaulDatabaseÕâ¸öÊý¾Ý¿âµÄËùÓÐȨÏÞ¶¼¸øpaulÓû§
Ö®ºóquit;
Èç¹û´ËÊ±ÖØÐµÇ¼,»á³öÏÖAccess denied, ÒòΪ´Ëʱpaul»¹Ã»ÓÐÆôÓÃ
ËùÒÔ,ÏÈÖÕÖ¹mysql·þÎñ,ÊäÈëÃüÁî sudo /etc/init.d/mysql stop
È»ºóÖØÐÂÆô¶¯  sudo /etc/init.d/mysql restart
ÔÙÒÔpaulÓû§ÃûµÇ¼¾ÍokÁË!


Ïà¹ØÎĵµ£º

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

 ×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³ ......

MySql ×Ö·û´®º¯Êý


MySql ×Ö·û´®º¯Êý
[ 2006-04-22 19:24:44 | Author: Ychon ]
Font Size: Large | Medium | Small
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str)
·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql ......

MYSQL Íâ¼ü¶¨ÒåÓëʹÓÃ

 
ÔÚMySQL 3.23.44°æ±¾ºó£¬InnoDBÒýÇæÀàÐ͵ıíÖ§³ÖÁËÍâ¼üÔ¼Êø¡£
Íâ¼üµÄʹÓÃÌõ¼þ£º
1.Á½¸ö±í±ØÐëÊÇInnoDB±í£¬MyISAM±íÔÝʱ²»Ö§³ÖÍâ¼ü£¨¾Ý˵ÒÔºóµÄ°æ±¾ÓпÉÄÜÖ§³Ö£¬µ«ÖÁÉÙĿǰ²»Ö§³Ö£©£»
2.Íâ¼üÁбØÐ뽨Á¢ÁËË÷Òý£¬MySQL 4.1.2ÒÔºóµÄ°æ±¾ÔÚ½¨Á¢Íâ¼üʱ»á×Ô¶¯´´½¨Ë÷Òý£¬µ«Èç¹ûÔÚ½ÏÔçµÄ°æ±¾ÔòÐèÒªÏÔʾ½¨Á¢£»
3.Íâ¼ü¹ØÏ ......

MySQL Explain µÄʹÓÃ

      ¶ÔÓÚʹÓà MySQL Õâ¸öÊý¾Ý¿âϵͳµÄÓû§À´Ëµ£¬Ëü²»½ö¿ªÔ´£¬Îȶ¨£¬Ð§ÂÊÒ²ºÜ¸ß¡£µ«ÓÐʱҲ»áÓöµ½Ò»Ð©ÐÔÄÜ·½ÃæµÄÎÊÌâ¡£Ò»°ãÇé¿ö¿ÉÄÜ»áÓÐÒÔϼ¸ÖÖ¿ÉÄÜ£º
1. Êý¾Ý±íµÄË÷ÒýûÓкÏÀíµÄ½¨ºÃ»òʹÓá£
2. SQLÓï¾ä¹ýÓÚ¸´ÔÓ£¬£¨×ó/ÓÒÁ¬½Ó£¬¶à±í²éѯµÈ£©¡£
3. ·þÎñÆ÷ÅäÖò»ºÏÀí¡£
4. ·þÎñÆ÷±¾ÉíµÄ´¦ÀíÄÜ ......

mysql»ù±¾ÃüÁî

 Æô¶¯£ºnet start mySql;
  ½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
  ÁгöÊý¾Ý¿â£ºshow databases;
  Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
  Áгö±í¸ñ£ºshow tables£»
  ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
  ½¨Á¢Êý¾Ý¿â£ºsource fileNam ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ