MySQL Óû§¹ÜÀí
Ê×ÏÈÒªÉùÃ÷һϣºÒ»°ãÇé¿öÏ£¬ÐÞ¸ÄMySQLÃÜÂ룬ÊÚȨ£¬ÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ġ£
²âÊÔ»·¾³£ºWIN32 mysql5.0.45
×¢£º±¾²Ù×÷ÊÇÔÚWINÃüÁîÌáʾ·ûÏ£¬phpMyAdminͬÑùÊÊÓá£
Óû§£ºphplamp Óû§Êý¾Ý¿â£ºphplampDB
1.н¨Óû§¡£
//怬MYSQL
@>mysql -u root -p
@>ÃÜÂë
//´´½¨Óû§
mysql> insert into mysql.user(Host,User,Password) values("localhost","phplamp",password("1234"));
//Ë¢ÐÂϵͳȨÏÞ±í
mysql>flush privileges;
ÕâÑù¾Í´´½¨ÁËÒ»¸öÃûΪ£ºphplamp ÃÜÂëΪ£º1234 µÄÓû§¡£
È»ºóµÇ¼һÏ¡£
mysql>exit;
@>mysql -u phplamp -p
@>ÊäÈëÃÜÂë
mysql>µÇ¼³É¹¦
2.ΪÓû§ÊÚȨ¡£
//µÇ¼MYSQL£¨ÓÐROOTȨÏÞ£©¡£ÎÒÀïÎÒÒÔROOTÉí·ÝµÇ¼.
@>mysql -u root -p
@>ÃÜÂë
//Ê×ÏÈΪÓû§´´½¨Ò»¸öÊý¾Ý¿â(phplampDB)
mysql>create database phplampDB;
//ÊÚȨphplampÓû§ÓµÓÐphplampÊý¾Ý¿âµÄËùÓÐȨÏÞ¡£
>grant all privileges on phplampDB.* to phplamp@localhost identified by '1234';
//Ë¢ÐÂϵͳȨÏÞ±í
mysql>flush privileges;
mysql>ÆäËü²Ù×÷
/*
Èç¹ûÏëÖ¸¶¨²¿·ÖȨÏÞ¸øÒ»Óû§£¬¿ÉÒÔÕâÑùÀ´Ð´:
mysql>grant select,update on phplampDB.* to phplamp@localhost identified by '1234';
//Ë¢ÐÂϵͳȨÏÞ±í¡£
mysql>flush privileges;
*/
3.ɾ³ýÓû§¡£
@>mysql -u root -p
@>ÃÜÂë
mysql>DELETE from user WHERE User="phplamp" and Host="localhost";
mysql>flush privileges;
//ɾ³ýÓû§µÄÊý¾Ý¿â
mysql>drop database phplampDB;
4.ÐÞ¸ÄÖ¸¶¨Óû§ÃÜÂë¡£
@>mysql -u root -p
@>ÃÜÂë
mysql>update mysql.user set password=password('ÐÂÃÜÂë') where User="phplamp" and Host="localhost";
mysql>flush privileges;
Ïà¹ØÎĵµ£º
1.²éÕÒµ±
mysql> show binary logs;
+—————-+———–+
| Log_name | File_size |
+—————-+———–+
| mysql-bin.000001 | 150462942 |
| mysql-bin.000002 | 125 |
| mysql-bin.000003 | 106 |
+&mdash ......
ÏÈ˵Ã÷Ò»ÏÂBlobµÄÀàÐÍ£¬Ö±½Ó´ÓÍøÉÏÕª³ÁË£¡£¡£¡
1¡¢MySQLÓÐËÄÖÖBLOBÀàÐÍ:
¡¡¡¡·tinyblob:½ö255¸ö×Ö·û
¡¡¡¡·blob:×î´óÏÞÖƵ½65K×Ö½Ú
¡¡¡¡·mediumblob:ÏÞÖƵ½16M×Ö½Ú
¡¡¡¡·longblob:¿É´ï4GB
2¡¢³ýÁËÀàÐͶԺóÃæ´æÈ¡Îļþ´óСÓÐÏÞÖÆ£¬»¹ÒªÐÞ¸ÄmysqlµÄÅäÖÃÎļþ¡£
¡¡¡¡Windows¡¢linux»ù±¾Ò»Ñù ......
mysqldump -uÓû§Ãû -pÃÜÂë Êý¾Ý¿âÃû >dumpÎļþµÄ·¾¶ºÍÃû³Æ
mysql> source dump.sql
There are three general ways to invoke mysqldump:
shell> mysqldump [options] db_name [tbl_name ...]
shell> mysqldump [options] --databases db_name ...
shell> mysqldump [options] --all-databases
......
¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......