MySQLÖг£ÓõÄÐ޸ıíµÄÃüÁî
MySQLÖг£ÓõÄÐ޸ıíµÄÃüÁî
¹Ø¼ü×Ö: mysql, Ð޸ıí, ÃüÁî
ÔÚÊý¾Ý¿â²Ù×÷ÖÐ,¸öÈ˾õµÃʹÓõÃ×î¶àµÄ¾ÍÊDzéѯ,È»ºó¾ÍÊǶԱíµÄÐ޸IJÙ×÷ÁË,ÓÈÆäÊǵ±Êý¾Ý¿âµÄÉè¼Æ¹¤×÷ûÓÐ×öºÃʱ.ÏÂÃæ¾ÍMySQLÖÐһЩ³£ÓõÄÐ޸ıíµÄ²Ù×÷½øÐÐ×ܽá:
ΪÁË·½±ãºóÃæµÄ˵Ã÷,ÏÈ´´½¨Ò»¸ö±í,´´½¨Óï¾äÈçÏÂ:
Create Table member(
id Int(3),
name Varchar(8),
pass Varchar(25)
);
1.Ïò±ímemberÖÐÔö¼ÓÒ»¸öÐÂÁÐemail,MySQLÓï¾äÈçÏÂ:
Alter Table member Add email Varchar(50) Not Null;
Describe member;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(3) | YES | | NULL | |
| name | varchar(8) | YES | | NULL | |
| pass | varchar(8) | YES | | NULL | |
| email | varchar(50) | NO | | NULL | |
+-------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
2.Ïò±ímemberÖÐÌí¼ÓÒ»¸öеÄÖ÷¼üid,MySQLÓï¾äÈçÏÂ:
Alter Table member Add Primary Key(id);
Describe member;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(3) | NO | PRI | 0 | |
| name | varchar(8) | YES | | NULL
Ïà¹ØÎĵµ£º
¿ÉÒÔ£¬µ«ÊÇÍêÈ«»Ö¸´ËùÓÐµÄ±í²»Ò»¶¨¿ÉÒÔ
¹¤¾ß: innodb-recovery
Official Website: http://code.google.com/p/innodb-tools/
This set of tools could be used to check InnoDB
tablespaces and to recover data from damaged tablespaces or from
dropped/truncated InnoDB tables.
Õâ¸ö¹¤¾ßÓÃÀ´¼ì²éInnoDB¿Õ¼ä±íºÍ» ......
1.1.1 MySQLÏÂÔØ¡¢°²×°ÓëÆô¶¯
ÔÚʹÓÃMySQL֮ǰ£¬ÐèÒª½¨Á¢Êý¾Ý¿âµÄ»·¾³À´´´½¨Êý¾Ý±í£¬Ê×ÏÈÎÒÃÇÐèÒª°²×°¸ÃÊý¾Ý¿â»·¾³£¬¼´MySQL¡£
1¡¢ÏÂÔØMySQL
MySQLµÄ¹Ù·½ÍøÕ¾ÊÇhttp://www.mysql.org/£¬Èçͼ2-9Ëùʾ£º
ͼ2-9 MySQL¹Ù·½ÍøÕ¾
µ±Ç°Îȶ¨°æ±¾Îª5.1£¬ÎÒÃÇÑ¡ÓÃMySQL 5.1.22×÷ΪÊý¾Ý¿â·þÎñÆ÷£¬µ½Æä¹Ù·½ ......
1. ¹ØµôMysql·þÎñ
2.н¨Ò»¸öÎı¾Îļþ£¬ÄÚÈÝÈçÏ£º
UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root';
FLUSH PRIVILEGES;
×¢Ò⣺һ¶¨Òª·ÖÁ½ÐÐд£¬"NewPassword"ΪÄãµÄÐÂÃÜÂë
3. ±£´æÎļþ£¬²¢°ÑËü·ÅÔÚCÅ̸ùĿ¼Ï£¬ÎļþÃûΪ"mysql-init.txt"£ºC:\mysql-init.txt
4. ´ò¿ªcmd´°¿Ú£¬Êä ......
ÅäÖû·¾³:UUbuntu 8.04
1.°²×°vsftpd
sudo apt-get install vsftpd
2.´´½¨guestÓû§
vsftpd°²×°µÄʱºò»á×Ô¶¯°²×ªÒ»¸öftpÓû§£¬ÔÚpasswdÖÐɾ³ý
sudo useradd virtual
ÉèÖÃvirtualµÄÃÜÂëΪwebftp
sudo passwd virtual
±à¼virtualÓû§µÄÖ÷Ŀ¼²¢ÉèÖÃshell
sudo vim /etc/passwd
ÎÒÉèÖõÄÊÇvirtual:x:1001: ......