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

MYSQL³õѧÕßʹÓÃÖ¸ÄÏ

Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql –hÖ÷»úµØÖ· –uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£ºmysql>
2¡¢Àý2£ºÁ¬½Óµ½Ô¶³ÌÖ÷»úÉϵÄMYSQL¡£¼ÙÉèÔ¶³ÌÖ÷»úµÄIPΪ£º110.110.110.110£¬Óû§ÃûΪroot,ÃÜÂëΪabcd123¡£Ôò¼üÈëÒÔÏÂÃüÁ
mysql -h110.110.110.110 -uroot -pabcd123
£¨×¢:uÓëroot¿ÉÒÔ²»Óüӿոñ£¬ÆäËüÒ²Ò»Ñù£©
3¡¢Í˳öMYSQLÃüÁ exit £¨»Ø³µ£©
¶þ¡¢ÐÞ¸ÄÃÜÂë¡£
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
1¡¢Àý1£º¸øroot¼Ó¸öÃÜÂëab12¡£Ê×ÏÈÔÚDOSϽøÈëĿ¼mysqlbin£¬È»ºó¼üÈëÒÔÏÂÃüÁî
mysqladmin -uroot -password ab12
×¢£ºÒòΪ¿ªÊ¼Ê±rootûÓÐÃÜÂ룬ËùÒÔ-p¾ÉÃÜÂëÒ»Ïî¾Í¿ÉÒÔÊ¡ÂÔÁË¡£
2¡¢Àý2£ºÔÙ½«rootµÄÃÜÂë¸ÄΪdjg345¡£
mysqladmin -uroot -pab12 password djg345
Èý¡¢Ôö¼ÓÐÂÓû§¡££¨×¢Ò⣺ºÍÉÏÃ治ͬ£¬ÏÂÃæµÄÒòΪÊÇMYSQL»·¾³ÖеÄÃüÁËùÒÔºóÃ涼´øÒ»¸ö·ÖºÅ×÷ΪÃüÁî½áÊø·û£©
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
Àý1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬ÈëMYSQL£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to test1@"%" Identified by "abc";
µ«Àý1Ôö¼ÓµÄÓû§ÊÇÊ®·ÖΣÏյģ¬ÄãÏëÈçij¸öÈËÖªµÀtest1µÄÃÜÂ룬ÄÇôËû¾Í¿ÉÒÔÔÚinternetÉϵÄÈκÎһ̨µçÄÔÉϵǼÄãµÄmysqlÊý¾Ý¿â²¢¶ÔÄãµÄÊý¾Ý¿ÉÒÔΪËùÓûΪÁË£¬½â¾ö°ì·¨¼ûÀý2¡£
Àý2¡¢Ôö¼ÓÒ»¸öÓû§test2ÃÜÂëΪabc,ÈÃËûÖ»¿ÉÒÔÔÚlocalhostÉϵǼ£¬²¢¿ÉÒÔ¶ÔÊý¾Ý¿âmydb½øÐвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄ²Ù×÷£¨localhostÖ¸±¾µØÖ÷»ú£¬¼´MYSQLÊý¾Ý¿âËùÔÚµÄÄÇ̨Ö÷»ú£©£¬ÕâÑùÓû§¼´Ê¹ÓÃÖªµÀtest2µÄÃÜÂ룬ËûÒ²ÎÞ·¨´ÓinternetÉÏÖ±½Ó·ÃÎÊÊý¾Ý¿â£¬Ö»ÄÜͨ¹ýMYSQLÖ÷»úÉϵÄwebÒ³À´·ÃÎÊÁË¡£
grant select,insert,update,delete on mydb.* to test2@localhost identified by "abc";
Èç¹ûÄã²»Ïëtest2ÓÐÃÜÂ룬¿ÉÒÔÔÙ´òÒ»¸öÃüÁÃÜÂëÏûµô¡£
grant select,insert,update,delete on mydb.* to test2@localhost identified by "";
Ó


Ïà¹ØÎĵµ£º

PHPºÍMySQL Web¿ª·¢ (Ô­ÊéµÚ4°æ) »úе¹¤Òµ

http://www.xhsd.com.cn/books/views.asp?plucode=711126281
Õâ±¾Êé±»³ÆΪPHPºÍMySQLµÄ“Ê¥¾­”£¬×Ðϸ¿´ÁËһϣ¬µÄÈ·Óкܶà¶Àµ½µÄµØ·½¡£
Ê×ÏÈ£¬ÄÚÈÝÃ÷È·Í»³ö¡£Õâ±¾ÊéµÄÄ¿µÄÊǶÔPHPºÍMySQL×öÉîÈëdz³öµÄ·ÖÎö£¬¶ÔÆäWebÓ¦ÓÃ×öÁ˽ÏÈ«ÃæµÄ²ûÊö£¬Àý×Ó¾­µäʵÓá£
Æä´Î£¬Ð¡£PHP5.3£¬MySQLµÄ´æ´¢¹ý³ÌºÍ´æ´¢ÒýÇ棬Ajax¼¼ ......

MySQL´æ´¢ÒýÇæ±È½Ï

MySQL³£ÓõĴ洢ÒýÇæΪMyISAM¡¢InnoDB¡¢MEMORY¡¢MERGE£¬ÆäÖÐInnoDBÌṩÊÂÎñ°²È«±í£¬ÆäËû´æ´¢ÒýÇ涼ÊÇ·ÇÊÂÎñ°²È«±í¡£ 
MyISAMÊÇMySQLµÄĬÈÏ´æ´¢ÒýÇæ¡£MyISAM²»Ö§³ÖÊÂÎñ¡¢Ò²²»Ö§³ÖÍâ¼ü£¬µ«Æä·ÃÎÊËٶȿ죬¶ÔÊÂÎñÍêÕûÐÔûÓÐÒªÇó¡£ 
InnoDB´æ´¢ÒýÇæÌṩÁ˾ßÓÐÌá½»¡¢»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«¡£µ«ÊDZÈÆðMyISAM´æ´ ......

MySQL·À×¢Èë


·ÀÖ¹×¢ÈëµÄ¼¸ÖÖ°ì·¨
 
ÆäʵԭÀ´¾ÍÊÇÎÒÃÇÐèÒª¹ýÂËһЩÎÒÃdz£¼ûµÄ¹Ø¼ü×ֺͷûºÏÈ磺
Select£¬insert£¬update£¬delete£¬and£¬*£¬µÈµÈ
function inject_check($sql_str) {
   return eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file
|outfile', $sql_str); & ......

java¿ª·¢ÖÐMysqlÖÐÎÄÂÒÂëÎÊÌâµÄ½â¾ö

     MysqlÔÚĬÈÏÇé¿öϽ¨Á¢±íµÄ×Ö·û±àÂëÊÇlatin1£¬ËùÒÔÔÚ²åÈëÖÐÎÄʱ»á³ö´í¡£
eg£º
1¡¢²é¿´±í½¨Á¢µÄsqlÔ´Â룺
1: sqlÃüÁshow create table users
2:
3: ½á¹û£º
4: CREATE TABLE `users` (
5: `userID` int(10) unsigned NOT NULL AUTO_INCREMENT,
6: `userName` varchar(4 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ