ÃüÁîÐÐÈçºÎÔ¶³ÌÁ¬½ÓMySQLÊý¾Ý¿â
ÐÂʹÓÃMySQL£¬ËµÆðÀ´ÊǸö¼òµ¥µÄÊÂÇ飬µ«ÊÇÈ´·ÑÁËЩÖÜÕÛ£º
1¡¢µÇ½·þÎñÆ÷¶Ë£¬½øÈëÃüÁîÐУ¬windows cmd;
2¡¢ÉèÖÃÓû§¡¢ÃÜÂëÈÃÖ¸¶¨µÄIP·ÃÎÊ£ºmysql -u root -p »ò°²×°µÄ¿ì½Ý·½Ê½½øÈë:MySQL Command Line Client,ʹÓÃgrantÃüÁ
grant ȨÏÞ1,ȨÏÞ2,…ȨÏÞn on Êý¾Ý¿âÃû³Æ.±íÃû³Æ to Óû§Ãû@Óû§µØÖ· identified by 'Á¬½Ó¿ÚÁî';
Àý×Ó£º
mysql>grant select,insert,update,delete,create,drop on mydb.mytable to lzpddd@192.168.1.88 identified by 'mypassword';
¸øÀ´×Ô192.168.1.88µÄÓû§lzpddd·ÖÅä¿É¶ÔÊý¾Ý¿â mydbµÄmytable±í½øÐÐselect,insert,update,delete,create,dropµÈ²Ù×÷µÄȨÏÞ£¬²¢É趨¿ÚÁîΪ'mypassword';
mysql>grant all privileges on *.* to lzpddd@192.168.1.88 identified by 'mypassword';
¸øÀ´×Ô192.168.1.88µÄÓû§lzpddd·ÖÅä¿É¶ÔËùÓÐÊý¾Ý¿âµÄËùÓбí½øÐÐËùÓвÙ×÷µÄȨÏÞÏÞ£¬²¢É趨¿ÚÁîΪ'mypassword';
mysql>grant all privileges on *.* to lzpddd@% identified by 'mypassword';
¸øÀ´×ÔÈκÎIPµØÖ·µÄÓû§lzpddd·ÖÅä¿É¶ÔËùÓÐÊý¾Ý¿âµÄËùÓбí½øÐÐËùÓвÙ×÷µÄȨÏÞÏÞ£¬²¢É趨¿ÚÁîΪ'mypassword';
3¡¢¹Ø±Õ·þÎñÆ÷¶Ë·À»ðǽ»òÕß¿ª·Å3306¶Ë¿Ú£¨ºÜÖØÒª£©£»
4¡¢¿Í»§¶ËÁ¬½Ó£º
½øÈëÃüÁîÐУ¬windows cmd£¬Á¬½Ó£º
mysql -u Óû§Ãû -pÃÜÂë -h ·þÎñÆ÷IPµØÖ· -P ·þÎñÆ÷¶ËMySQL¶Ë¿ÚºÅ -D Êý¾Ý¿âÃû
×¢Ò⣺
(1)·þÎñÆ÷¶Ë¿Ú±êÖ¾-PÒ»¶¨Òª´óЩÒÔÇø±ðÓÚÓû§-p,Èç¹ûÖ±½ÓÁ¬½ÓÊý¾Ý¿â±êÖ¾-DÒ²Òª´óд£»
(2)Èç¹ûÒªÖ±½ÓÊäÈëÃÜÂë-pºóÃæ²»ÄÜÁôÓпոñÈç-pmypassword;
(3)ÃüÁî½áÊø¶ÎûÓÐ';'·ÖºÅ¡£
Àý×Ó£º
mysql -u lzpddd -pmypassword -h 192.168.1.88 -P 3306 -D mydb
Ïà¹ØÎĵµ£º
update £ºµ¥±íµÄ¸üв»ÓÃ˵ÁË£¬Á½ÕßÒ»Ñù£¬Ö÷Ҫ˵˵¶à±íµÄ¸üÐÂ
Oracle> OracleµÄ¶à±í¸üÐÂÒªÇó±È½ÏÑϸñ£¬ËùÒÔÓеÄʱºò²»ÊǺܺÃд£¬ÎÒÃÇ¿ÉÒÔÊÔÊÔOracleµÄÓαê
&n ......
MySQLµÄ±¸·Ý·½Ê½£¬Ä¿Ç°ÎÒÏëµ½µÄÓÐÎåÖÖ£¬ÓпÉÄÜ»¹ÓÐ
1£¬mysqldump·½Ê½£¬¼ÓÉϾßÌå²ÎÊýÃû£¨µ¥¿â£¬¶à¿â£¬´¥·¢Æ÷£¬´æ´¢¹ý³Ì£¬±í½á¹¹£¬×Ö·û¼¯£¬–single-transaction£¬µÈµÈ£©
2£¬mysqlhotcopy Ö»Äܱ¸·ÝmyisamÊý¾Ý±í±¸·Ý£¬ËÙ¶ÈÏ൱¿ì£¬ÒòΪÊÇÎļþ¿½±´£¬¿ÉÄÜ˲¼ä±»Ëø±í£¬ÈκεÄÊý¾Ý²Ù×÷£¬±ÈÈç²åÈëºÍ¸üж¼»á¹ÒÆð¡£
3£¬LVMµ ......
## **********first test,procedure**********
#<1>
use testprocedure;
delimiter //
create procedure simpleproce1 (out par1 int)
begin
select count(*) into par1 from proce;
end
//
delimiter ;
call simpleproce1(@a);
select @a;
#<2>,ÿ´ÎÖ»Óе¥Ò»µÄÐпÉÒÔ±»È¡»Øselect id,name i ......