¹ØÓÚÐÞ¸ÄmysqlµÄrootÃÜÂëµÄ½â´ð£¨×ܽáƪ£©
¹ØÓÚÐÞ¸ÄmysqlµÄrootÃÜÂëµÄ½â´ð£¨×ܽáƪ£©
ÕûÀíÁËÒÔÏÂËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨,Ö÷ÒªÊÇÓÐʱºò×Ô¼ºÓöµ½ÁËÕâ¸öÎÊÌâ²»ÖªµÀÔõô¸ãÁË£¬µ±È»Èç¹ûÄܸø¹ã´óµÄPHPer½â¾öÎÊÌâÒ²ÊÇÎÒµÄÈÙÐÒ°¡£¬ºÇºÇ¡£
·½·¨1£º ÓÃSET PASSWORDÃüÁî
¡¡¡¡mysql -u root
¡¡¡¡mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
·½·¨2£ºÓÃmysqladmin
mysqladmin -u root password "newpass"
¡¡¡¡Èç¹ûrootÒѾ
ÉèÖùýÃÜÂ룬²ÉÓÃ
ÈçÏ·½·¨
¡¡¡¡mysqladmin -u root password oldpass "newpass"
·½·¨3£º ÓÃUPDATEÖ±½Ó±à¼user±í
¡¡¡¡mysql -u root
¡¡¡¡mysql> use mysql;
¡¡¡¡mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';
¡¡¡¡mysql> FLUSH PRIVILEGES;
ÔÚ¶ªÊ§rootÃÜÂëµÄʱºò£¬¿ÉÒÔÕâÑù
¡¡¡¡mysqld_safe --skip-grant-tables&
¡¡¡¡mysql -u root mysql
¡¡¡¡mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root';
¡¡¡¡mysql> FLUSH PRIVILEGES;
Ö§³Ö¿ªÔ´£¬×ðÖرðÈ˵ÄÀͶ¯³É¹û,±¾ÎIJ¿·ÖÄÚÈÝתÔØ×Ôhttp://www.linuxidc.com/Linux/2008-02/11137.htm¡£
Ïà¹ØÎĵµ£º
9.3 MySQL´æ´¢¹ý³Ì
MySQL 5.0ÒÔºóµÄ°æ±¾¿ªÊ¼Ö§³Ö´æ´¢¹ý³Ì£¬´æ´¢¹ý³Ì¾ßÓÐÒ»ÖÂÐÔ¡¢¸ßЧÐÔ¡¢°²È«ÐÔºÍÌåϵ½á¹¹µÈÌص㣬±¾½Ú½«Í¨¹ý¾ßÌåµÄʵÀý½²½âPHPÊÇÈçºÎ²Ù×ÝMySQL´æ´¢¹ý³ÌµÄ¡£
ʵÀý261£º´æ´¢¹ý³ÌµÄ´´½¨
ÕâÊÇÒ»¸ö´´½¨´æ´¢¹ý³ÌµÄʵÀý
¼ÏñλÖ㺹âÅÌ\mingrisoft\09\261
ʵÀý˵Ã÷
ΪÁ˱£Ö¤Êý¾ÝµÄÍêÕûÐÔ¡¢Ò»ÖÂÐÔ£¬Ìá ......
£©MySql ÖÐÎÄÍø£ºhttp://imysql.cn/onlinedoc
£©MySQL ÖÐÎÄÉçÇø £ºhttp://www.mysql.net.cn/
£©MySql °Ù¶È°Ù¿Æ£ºhttp://baike.baidu.com/view/24816.htm
²Î¿¼×ÊÁÏ£º
MySql°æ±¾¹¹¼Ü¼°Ë÷ÒýÎļþ½éÉÜ
Linux·þÎñÆ÷ÅäÖ÷½°¸MySQL
WinodwsÏÂIIS/Apache PHP MySQLµÄ°²×°ÅäÖÃ
³õѧMySQLÄÄЩÐèÒªÄãÖªµÀ& ......
#!/usr/bin/perl
use Mysql;
print "Content-type:
text/html \n\n";
# MySQL
ÅäÖñäÁ¿
$host = "localhost";
$database
= "testdb";
$tablename = "testtable";
$user = "username";
$pw =
"password";
# PERL MYSQL CONNECT()
$connect = ......
MYSQLÍü¼ÇROOTÃÜÂëºó£¿
ÐÞ¸ÄMySQLµÄµÇ¼ÉèÖãº
1.È¡ÏûȨÏÞ¹ÜÀí
±à¼ /mysql5.1/my.ini
ÔÚ[mysqld]µÄ¶ÎÖмÓÉÏÒ»¾ä£ºskip-grant-tables
ÀýÈ磺
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-name-resolve
skip-grant-tables
Ä¿µÄÊÇΪÁË£º
Ìø¹ýMySQLµÄ·ÃÎ ......