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

mysql access deined

ÎÒµÄϵͳÊÇ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 password 'newpassword'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
ÏÖÔÚÖÕÓÚ±»ÎÒÕÒµ½Á˽â¾ö·½·¨£¬ÈçÏ£¨ÇëÏȲâÊÔ·½·¨Èý£¬Ð»Ð»£¡£©£º
·½·¨Ò»£º
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <ÊäÈëÐÂÉèµÄÃÜÂënewpassword>
mysql>
·½·¨¶þ£º
Ö±½ÓʹÓÃ/etc/mysql/debian.cnfÎļþÖÐ[client]½ÚÌṩµÄÓû§ÃûºÍÃÜÂë:
# mysql -udebian-sys-maint -p
Enter password: <ÊäÈë[client]½ÚµÄÃÜÂë>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <ÊäÈëÐÂÉèµÄÃÜÂënewpassword>
mysql>
·½·¨Èý£º
ÕâÖÖ·½·¨ÎÒûÓнøÐйý²âÊÔ£¬ÒòΪÎÒµÄrootÓû§Ä¬ÈÏÃÜÂëÒѾ­±»ÎÒÐ޸ĹýÁË£¬ÄÇλÓпղâÊÔһϣ¬°Ñ½á¹û¸æËßÎÒ£¬Ð»Ð»£¡£¡
# mysql -uroot -p
Enter password: <ÊäÈë/etc/mysql/debian.cnfÎļþÖÐ[client]½ÚÌṩµÄÃÜÂë>
ÖÁ´Ë£¬À§»ó¶àʱµÄÎÊÌâ½â¾öÁË£¡


Ïà¹ØÎĵµ£º

OracleµÄNVL()º¯ÊýºÍMySQLÖеÄIfNull()º¯Êý

MS SQL ÖеÄIsNull()º¯Êý£º
IsNull ( check_expression , replacement_expression )
check_expression: ¿ÉÒÔÊÇÈκÎÀàÐÍ,½«Òª¼ì²éµÄ±í´ïʽ  ²»Îª¿Õ£¬·µ»ØËü
replacement_expression: ÀàÐͱØÐëºÍcheck_expressionÏàͬ£¬check_expressionΪnull£¬·µ»ØËü
Õâ¸öº¯ÊýµÄ×÷ÓþÍÊÇ£ºÅжÏcheck_expressionÊÇ·ñΪ¿Õ£¬Îª¿Õ¾Í·µ» ......

MySqlÈÕÆÚ¸ñʽ»¯

DATE_FORMAT(date,format)
¸ù¾Ýformat×Ö·û´®¸ñʽ»¯dateÖµ¡£ÏÂÁÐÐÞÊηû¿ÉÒÔ±»ÓÃÔÚformat×Ö·û´®ÖУº %M ÔÂÃû×Ö(January……December)
%W
ÐÇÆÚÃû×Ö(Sunday……Saturday)
%D ÓÐÓ¢Óïǰ׺µÄÔ·ݵÄÈÕÆÚ(1st, 2nd, 3rd, µÈµÈ¡££©
%Y Äê, Êý×Ö, 4 λ
%y Äê, Êý×Ö, 2 λ
%a ËõдµÄÐÇÆÚÃû×Ö(Sun ......

apache tomcat mysql ¸ºÔØƽºâºÍ¼¯Èº¼¼Êõ

¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾­¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......

MySQLϵͳ½á¹¹Í¼

 
½ü¶Îʱ¼äͻȻ¶ÔMYSQLÕâ¸ö¿ªÔ´Êý¾ÝÓÐÁËÐËȤ£¬Ö÷ÒªÊÇÆäÊÇ¿ªÔ´Ãâ·Ñ£¬ÏëÏëÒÔºóÎÞÂÛÊǹ«Ë¾×öÏîÄ¿»¹ÊǸöÈË×öЩ¼òµ¥µÄСϵͳ£¬¶¼¿ÉÒÔÑ¡Ôñ£¬ÓÚÊÇ»¨Á˵ãʱ¼äÑо¿ÁËÏ£¬ÏÖÔÚ·ÖÏíÏÂ×Ô¼ºµÄѧϰÐĵ᣽ñÌì¿´ÁËдÆäϵͳµÄ×é³ÉºÍÕûÌå½á¹¹£¬ÏÖÔÚ°ÑÕûÌåµÄ½á¹¹ÓÃVISIO»­ÁËÏ£¬È»ºóÖðÒ»½âÊÍ£¬²¢²ûÊöÏÂÎÒµÄÀí½â£¬Ï±ßÊÇMySQLϵͳ½á¹¹Í¼µ ......

MySQL³ÌÐòÆÊÎö£¨Profiling£©

ÎÒÃǽ«ÒªÏêϸµÄ½²µ½MySQLµÄÆÊÎö(Profiling),ÒòΪËüºÜÉÙÒÀÀµÓÚÄãµÄÓ¦Óá£Ó¦ÓúͷþÎñÆ÷¼¶±ðµÄÆÊÎöÓеÄʱºò¶¼ÊÇÓбØÒªµÄ¡£ËäȻӦÓü¶±ðµÄÆÊÎö¿ÉÒÔ¸øÄãÕû¸öÓ¦ÓÃÐÔÄܵÄ×ÜÀ¿¡££¬µ«ÊǶÔMySQLµÄÆÊÎöÌṩÁËÐÅÏ¢ÊÇ·þÎñÆ÷¼¶±ðËùÌṩ²»Á˵ġ£±ÈÈ磬¶ÔPHP´úÂë½øÐÐÆÊÎö²»»áÏÔʾMySQLÓжàÉÙÐÐÓï¾äÖ´ÐÐÁË¡£
 
ÓëÓ¦ÓÃÆÊÎöÒ»Ñù£¬Ä¿±êÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ