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
Ïà¹ØÎĵµ£º
²Ù×÷Êý¾Ý¿â
µÇ¼µ½mysqlÖУ¬È»ºóÔÚmysqlµÄÌáʾ·ûÏÂÔËÐÐÏÂÁÐÃüÁÿ¸öÃüÁîÒԷֺŽáÊø¡£
1¡¢ ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
ȱʡÓÐÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£ mysql¿â´æ·Å×ÅmysqlµÄϵͳºÍÓû§È¨ÏÞÐÅÏ¢£¬ÎÒÃǸÄÃÜÂëºÍÐÂÔöÓû§£¬Êµ¼ÊÉϾÍÊǶÔÕâ¸ö¿â½øÐвÙ×÷¡£
2¡¢ ÏÔʾ¿âÖе ......
×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë
/**
* µ¼ÈëÊý¾Ý
* @param ½Å±¾µÄµØÖ·ºÍÃû³Æ
* @return ÊÇ·ñ³ ......
http://www.javaeye.com/topic/211951
Õâ¶Îʱ¼äÔÚ¿´¡¶High Performance MySQL¡·£¬¿´µ½´æ´¢ÒýÇæÕâ¸öµØ·½¸Ðµ½ºÜ¶àϸ½Ú±È½ÏÄ°Éú£¬ËùÒÔ×ܽáС¼ÇһЩ
ΪÁËÊÊÓ¦¸÷ÖÖ²»Í¬µÄÔËÐл·¾³£¬MYSQLÌṩÁ˶àÖÖ²»Í¬µÄ´æ´¢ÒýÇ棨Storage Engine £©,ÔÚÓ¦ÓóÌÐò¿ª·¢Õâ¸ö²ãÃæÉÏ£¬¿ª·¢Õß¿ÉÒÔ¸ù¾Ý²»Í¬µÄÐèÇóÑ¡ÔñÊʺϵÄStorage Engine ·½°¸£¬¸üΪÁ ......
ÎÒÔÚ°²×°XAMPP 1.7.0ʱ£¬°²×°³É¹¦ºó£¬´òËãÆô¶¯XAMPP¡£Apache˳ÀûÆô¶¯£¬µ«ÊÇMySqlÔõô¶¼Æô¶¯²»ÁË£¬ÌáʾµÄ´íÎóÊÇ£º
error:mysql service not started [-1]
ÎÒÖØÐÂ×°Á˼¸´Î¶¼²»ÐУ¬ÏÂÔØÁËÆäËûµÄ°æ±¾Ò²²»ÐУ¬ÎÒÕæ¸ã²»Çå³þΪʲô¡£ÎÒGoogleÁË°ëÌ죬ÆðÏÈʱÖÐÎÄÍøÒ³£¬°´ÕÕ¼¸¸ö½â¾ö·½·¨×öÁ˶¼²»ÐУ¬¿Ï¶¨ÊÇûÓжÔÖ¢ÏÂÒ©°Ñ£¬È»ºóÎÒµ ......