MySQL³£ÓÃÃüÁîÓë»ù±¾ÃüÁî²Ù×÷
1¡¢MySQL³£ÓÃÃüÁî
create database name; ´´½¨Êý¾Ý¿â
use databasename; Ñ¡ÔñÊý¾Ý¿â
drop database name Ö±½Óɾ³ýÊý¾Ý¿â£¬²»ÌáÐÑ
show tables; ÏÔʾ±í
describe tablename; ±íµÄÏêϸÃèÊö
select ÖмÓÉÏdistinctÈ¥³ýÖظ´×Ö¶Î
mysqladmin drop databasename ɾ³ýÊý¾Ý¿âÇ°£¬ÓÐÌáʾ¡£
ÏÔʾµ±Ç°mysql°æ±¾ºÍµ±Ç°ÈÕÆÚ
select version(),current_date;
2¡¢ÐÞ¸ÄmysqlÖÐrootµÄÃÜÂ룺
shell>mysql -u root -p
mysql> update user set password=password(”xueok654123″) where user=’root’;
mysql> flush privileges //Ë¢ÐÂÊý¾Ý¿â
mysql>use dbname£» ´ò¿ªÊý¾Ý¿â£º
mysql>show databases; ÏÔʾËùÓÐÊý¾Ý¿â
mysql>show tables; ÏÔʾÊý¾Ý¿âmysqlÖÐËùÓÐµÄ±í£ºÏÈuse mysql£»È»ºó
mysql>describe user; ÏÔʾ±ímysqlÊý¾Ý¿âÖÐuser±íµÄÁÐÐÅÏ¢£©£»
3¡¢grant
´´½¨Ò»¸ö¿ÉÒÔ´ÓÈκεط½Á¬½Ó·þÎñÆ÷µÄÒ»¸öÍêÈ«µÄ³¬¼¶Óû§£¬µ«ÊDZØÐëʹÓÃÒ»¸ö¿ÚÁîsomething×öÕâ¸ö
mysql> grant all privileges on *.* to user@localhost identified by ’something’ with
Ôö¼ÓÐÂÓû§
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by “ÃÜÂë”
GRANT ALL PRIVILEGES ON *.* TO monty@localhost IDENTIFIED BY ’something’ WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO monty@”%” IDENTIFIED BY ’something’ WITH GRANT OPTION;
ɾ³ýÊÚȨ£º
mysql> revoke all privileges on *.* from root@”%”;
mysql> delete from user where user=”root” and host=”%”;
mysql> flush privileges;
´´½¨Ò»¸öÓû§customÔÚÌض¨¿Í»§¶Ëit363.comµÇ¼£¬¿É·ÃÎÊÌض¨Êý¾Ý¿âfangchandb
mysql >grant select, insert, update, delete, create,drop on fangchandb.* to custom@ it363.c
Ïà¹ØÎĵµ£º
±¾´Î°²×°µÄϵͳƽ̨Ϊredhat 5
Ò»¡¢Ê¹ÓÃRPM°ü½øÐа²×°
Ê×ÏÈ¿ÉÒÔ´Ó°²×°¹âÅÌÖлòÕßµ½mysqlµÄÍøÕ¾ÉÏÏÂÔضÔÓ¦°æ±¾µÄrpm°üÈçÏ£º
MySQL-server-community-5.1.38-0.rhel5.i386.rpm
MySQL-client-community-5.1.38-0.rhel5.i386.rpm
½Ó×ÅÎÒÃÇ¿ÉÒÔʹÓÃrpmÃüÁî½øÐа²×°£º
rpm -ivh MySQL ......
ÎÊÌâÊÇÕâÑùµÄ£º
Ò»ÕÅtestµÄ±í£¬×Ö·û¼¯²ÉÓõÄlatin1¡£
select to_id from test where to_id='cnÏó_Íõ';
+---------------+
| to_id |
+---------------+
| cnÌÕ_ÌÕ |
| cnÏó_Íõ |
+---------------+
2 rows in set (0.00 sec)
È¡cnÏó_ÍõµÄÊý¾Ý,¾ÓÈ»°ÑcnÌÕ_ÌÕµÄÊý¾ÝҲȡ»ØÀ´ÁË¡£
ÕâÏÔÈ»ÊDz»ÔÊÐíµÄ¡£
......
½ñÌ죬Êý¾Ý¿âµÄ²Ù×÷Ô½À´Ô½³ÉΪÕû¸öÓ¦ÓõÄÐÔÄÜÆ¿¾±ÁË£¬Õâµã¶ÔÓÚWebÓ¦ÓÃÓÈÆäÃ÷ÏÔ¡£¹ØÓÚÊý¾Ý¿âµÄÐÔÄÜ£¬Õâ²¢²»Ö»ÊÇDBA²ÅÐèÒªµ£ÐĵÄÊ£¬¶øÕâ¸üÊÇÎÒÃdzÌÐòÔ±ÐèҪȥ¹Ø×¢µÄÊÂÇé¡£µ±ÎÒÃÇÈ¥Éè¼ÆÊý¾Ý¿â±í½á¹¹£¬¶Ô²Ù×÷Êý¾Ý¿âʱ£¨ÓÈÆäÊDzé±íʱµÄSQLÓï¾ä£©£¬ÎÒÃǶ¼ÐèҪעÒâÊý¾Ý²Ù×÷µÄÐÔÄÜ¡£ÕâÀÎÒÃDz»»á½²¹ý¶àµÄSQLÓï¾äµÄÓÅ»¯£¬¶øÖ»ÊÇÕë ......
Ò»¡¢Apache HTTP Server °²×°£º
ÔËÐÐApache .msi Îļþ£¬°²×°³ÌÐò½«ÒªÇóÄãÌîдÈçÏÂÄÚÈÝ£º
1. Network Domain¼üÈëÄãµÄ·þÎñÆ÷£¨»òÕßÊÇÄã¼´½«×¢²áµÄ·þÎñÆ÷£©µÄDNS ÓòÃû¡£ÀýÈ磬ÄãµÄ·þÎñÆ÷µÄDNSÓòÃûÈ«³ÆÊÇserver.mydomain.net,ÄãÖ»ÐèÔÚÕâÀïÊäÈëmydomain.net¡£
2. Server Name ¾ÍÊÇÄãµÄ·þÎñÆ÷µÄDNSÓòÃûÈ«³Æ£¬»¹ÊÇÉÏÃæµÄÀ ......