ÐÞ¸ÄmysqlµÄrootÃÜÂëµÄ¼¸ÖÖ·½·¨
×÷Õß: Ф½¨±ò
| ¿ÉÒÔתÔØ, תÔØʱÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦
ºÍ×÷ÕßÐÅÏ¢¼°°æȨÉùÃ÷
꿅᣼http://www.xiaojb.com/archives/it/mysqlroot.shtml
Method 1:
ÔÚ/usr/local/mysql/bin/Ï£º
./mysqladmin -u root password ‘new_password’
Ò»°ã°²×°Ê±Óô˷½·¨ÉèÖá£
Method 2:
ÔÚmysql״̬Ï£º
mysql>UPDATE user SET password=PASSWORD(’new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;
Method 3:
mysql>SET PASSWORD FOR root=PASSWORD(’new_password’);
²¹Ò»Ï²¹ÖªµÀrootÃÜÂëÇé¿öÏÂÐÞ¸ÄrootÃÜÂë
mysqldÆô¶¯µÄʱºò¼ÓÉÏ–skip-grant-tables£¬È»ºóÂíÉÏÐÞ¸ÄÃÜÂ룬Ð޸ĺóÈ¥µô–skip-grant-tables£¬È»ºó¾ÍOKÁË¡£
ÏëÆðÁË3ÄêÇ°ÔÚeyou¹¤×÷µÄʱºò£¬ÎªÁ˵¼qmail+vpopmail+mysqlµÄÓʼþÓû§³öÀ´£¬ÐÞ¸ÄÁËrootÃÜÂ룬µ«Êǵ±Ê±eyouµÄϵͳûÓÐʹÓã¬ÔÀ´µÄϵͳÒòΪrootÃÜÂë¶ø²»ÄÜʹÓã¬ÎҾͿ´libvpopmail.a£¬´Ó¶þ½øÖÆÎļþÖÐÕÒµ½ÁËÃÜÂ룺£©
Ïà¹ØÎĵµ£º
mysql·þÎñÆ÷°²×°ÅäÖãº
1. sudp apt-get install mysql-server-5.0
2. ´´½¨¿âsecond_proxy, ΪsecProxyÌí¼ÓÓû§£ºgrant all privileges on second_proxy.* to secProxy@'%' identified by 'passwd';
3. ÉèÖÃmysql.user±íÈçÏ£º
+-----------+------------------+-------------------------------------------+
| Host& ......
ÓÃrpm°ü°²×°µÄMySQLÊDz»»á°²×°/etc/my.cnfÎļþµÄ£¬
ÖÁÓÚΪʲôûÓÐÕâ¸öÎļþ¶øMySQLÈ´Ò²ÄÜÕý³£Æô¶¯ºÍ×÷Óã¬ÔÚµãÓÐÁ½¸ö˵·¨£¬
µÚÒ»ÖÖ˵·¨£¬my.cnfÖ»ÊÇMySQLÆô¶¯Ê±µÄÒ»¸ö²ÎÊýÎļþ£¬¿ÉÒÔûÓÐËü£¬ÕâʱMySQL»áÓÃÄÚÖõÄĬÈϲÎÊýÆô¶¯£¬
µÚ¶þÖÖ˵·¨£¬MySQLÔÚÆô¶¯Ê±×Ô¶¯Ê¹ÓÃ/usr/share/mysqlĿ¼ÏµÄmy-medium.cnfÎļþ£¬ÕâÖÖ˵·¨½ö ......
½â¾ömysql“Access denied for user
ÎÒµÄϵͳÊÇubuntu6.06£¬×î½üÐÂ×°ºÃµÄmysqlÔÚ½øÈëmysql¹¤¾ßʱ£¬×ÜÊÇÓдíÎóÌáʾ:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ʹÓÃÍøÉϽéÉܵķ½·¨ÐÞ¸ÄrootÓû§µÄÃÜÂ룺
# mysqladmin -uroot -p p ......
1.¹Ø¼ü×Ö
auto_increment
2.×ÔÔöÓ÷¨
Àý:
CREATE TABLE animals ( id mediumint not null auto_increment,
name char(30) not null,
primary key (id));
3.¹ØÓÚ×ÔÔö
Q:Ôõô»ñµÃµ±Ç°µÄ×ÔÔöµÄ×î´óÖµ?
A:select @@identity
Q:Ôõô»ñµÃtableµÄµ±Ç°×ÔÔö×î´óÖµ?
A:select max(i ......
1. ¼ò½é
ÔÚWebÓ¦ÓóÌÐòÌåϵ¼Ü¹¹ÖУ¬Êý¾Ý³Ö¾Ã²ã£¨Í¨³£ÊÇÒ»¸ö¹ØϵÊý¾Ý¿â£©ÊǹؼüµÄºËÐIJ¿·Ö£¬Ëü¶ÔϵͳµÄÐÔÄÜÓзdz£ÖØÒªµÄÓ°Ïì¡£MySQLÊÇĿǰʹÓÃ×î¶àµÄ¿ªÔ´Êý¾Ý¿â£¬µ«ÊÇMySQLÊý¾Ý¿âµÄĬÈÏÉèÖÃÐÔÄܷdz£µÄ²î£¬½ö½öÊÇÒ»¸öÍæ¾ßÊý¾Ý¿â¡£Òò´ËÔÚ²úÆ·ÖÐʹÓÃMySQLÊý¾Ý¿â±ØÐë½øÐбØÒªµÄÓÅ»¯¡£
ÓÅ»¯ÊÇÒ»¸ö¸´ÔÓµÄÈÎÎñ£¬±¾ÎÄÃèÊöMySQLÏ ......