LinuxÏÂÍü¼ÇMySQL rootÃÜÂëµÄ½â¾ö·½°¸
×î½üʵÑéÊÒÄÚ²¿µÄmysqlµÄrootÃÜÂë±»ÐÞ¸ÄÁË£¬ÐèÒªÏë°ì·¨ÐÞ¸ÄÐÂÃÜÂë¡£·½·¨ÈçÏ£º
1£¬ ¹Ø±Õmysql·þÎñ
/etc/init.d/mysqld stop
2£¬Ê¹ÓÖskip-grant-tablesÑ¡ÏîÆô¶¯MySQL·þÎñ,¿ÉÒÔÐÞ¸Ä/etc/inin.d/mysqld½Å±¾Æô¶¯Î»ÖÃÔö¼Ó´ËÑ¡Ï
vi /etc/init.d/mysqld
ÔÚÏÂÃæÔËÐÐÆô¶¯µÄÓï¾äÀïÔö¼Ó--skip-grant-tables
/usr/bin/mysqld_safe --skip-grant-tables --datadir="$datadir" --socket="$socketfile" \
--log-error="$errlogfile" --pid-file="$mypidfile" \
¡¡¡¡¼ÓÈë--skip-grant-tablesµÄÒâ˼ÊÇÆô¶¯MySQL·þÎñµÄʱºòÌø¹ýȨÏÞ±íÈÏÖ¤¡£Æô¶¯ºó£¬Á¬½Óµ½MySQLµÄroot²»ÐèÒª¿ÚÁî
3,ÖØÐÂÆô¶¯mysql·þÎñ
/etc/init.d/mysqld start
4. ÐÞ¸ÄrootÓû§µÄÃÜÂ룻
mysql> update mysql.user set password=PASSWORD£¨'123456'£© where User=root£»
mysql> flush privileges£»
mysql> quit
5. ÖØÐÂÆô¶¯MySQL£¬¾Í¿ÉÒÔʹÓÃÐÂÃÜÂëµÇ¼ÁË¡£
mysql -u root –p
ÊäÈëÃÜÂ룺123456
6£¬¹Ø±Õmysql·þÎñ
/etc/init.d/mysqld stop7£¬ÖØÐÂÐ޸ĵÚ2²½Ð޸ĵÄ/etc/init.d/mysqld£¬Ê¹Æä±£³ÖÔÀ´²»±ä£¬Ò²¾ÍÊÇÈ¡Ïû--skip-grant-tablesÓï¾ä
8,ÖØÐÂÆô¶¯mysql·þÎñ/etc/init.d/mysqld start
Ïà¹ØÎĵµ£º
1.ʲô½Ð×ö×Ö·û¼¯
×Ö·û¼¯¾ÍÊÇÒ»Ì×·ûºÅºÍ×Ö·û±àÂëµÄ¼¯ºÏ¡£
2.ʲô½Ð×öУ¶Ô¹æÔò
У¶Ô¹æÔò¾ÍÊÇÔÚ×Ö·û¼¯ÄÚÓÃÓڱȽÏ×Ö·ûµÄÒ»Ì×¹æÔò¡£
MYSQL5.1Êý¾Ý¿â¿ÉÒÔ×öµ½
· ʹÓöàÖÖ×Ö·û¼¯À´´æ´¢×Ö·û´®
· ʹÓöàÖÖУ¶Ô¹æÔòÀ´±È½Ï×Ö·û´®
· ÔÚͬһ̨·þÎñÆ÷¡¢Í¬Ò»¸öÊý¾Ý¿â»òÉõ ......
ÔÎÄÁ´½Ó£ºhttp://hi.baidu.com/171892549/blog/item/14818d0ac616ee34b1351dbd.html
ÔÚÊý¾Ý¿â±íÖУ¬Ê¹ÓÃË÷Òý¿ÉÒÔ´ó´óÌá¸ß²éѯËٶȡ£
¼ÙÈçÎÒÃÇ´´½¨ÁËÒ»¸ö testIndex ±í£º
CREATE TABLE testIndex(i_testID INT NOT NULL,vc_Name VARCHAR(16) NOT NULL);
ÎÒÃÇËæ»úÏòÀïÃæ²åÈëÁË 1000 Ìõ¼Ç¼£¬ÆäÖÐÓÐÒ»Ìõ i_testID vc_Name ......
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 3.23.44°æ±¾ºó£¬InnoDBÒýÇæÀàÐ͵ıíÖ§³ÖÁËÍâ¼üÔ¼Êø¡£
Íâ¼üµÄʹÓÃÌõ¼þ£º
1.Á½¸ö±í±ØÐëÊÇInnoDB±í£¬MyISAM±íÔÝʱ²»Ö§³ÖÍâ¼ü£¨¾Ý˵ÒÔºóµÄ°æ±¾ÓпÉÄÜÖ§³Ö£¬µ«ÖÁÉÙÄ¿Ç°²»Ö§³Ö£©£»
2.Íâ¼üÁбØÐ뽨Á¢ÁËË÷Òý£¬MySQL 4.1.2ÒÔºóµÄ°æ±¾ÔÚ½¨Á¢Íâ¼üʱ»á×Ô¶¯´´½¨Ë÷Òý£¬µ«Èç¹ûÔÚ½ÏÔçµÄ°æ±¾ÔòÐèÒªÏÔʾ½¨Á¢£»
3.Íâ¼ü¹ØÏ ......