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

LinuxϵͳÏÂMySQLÏà¹ØÃüÁî


Ò»¡¢×ܽáһϣº
1.LinuxϵͳÏÂÆô¶¯MySQLµÄÃüÁ
mysqladmin start
/etc/init.d/mysql start (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
2.linuxÏÂÖØÆômysqlµÄÃüÁ
mysqladmin restart
/etc/init.d/mysql restart (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
3.linuxϹرÕmysqlµÄÃüÁ
mysqladmin shutdown
/etc/init.d/mysql   shutdown (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
4.Á¬½Ó±¾»úÉϵÄmysql£º
½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÊäÈëÃÜÂë¡£
Í˳ömysqlÃüÁexit£¨»Ø³µ£©
5.ÐÞ¸ÄmysqlÃÜÂ룺
mysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
»ò½øÈëmysqlÃüÁîÐÐSET PASSWORD FOR root=PASSWORD("root");
6.Ôö¼ÓÐÂÓû§¡££¨×¢Ò⣺mysql»·¾³ÖеÄÃüÁîºóÃ涼´øÒ»¸ö·ÖºÅ×÷ΪÃüÁî½áÊø·û£©
grant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
ÈçÔö¼ÓÒ»¸öÓû§testÃÜÂëΪ123£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬Èëmysql£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to " Identified by "123";
¶þ¡¢ÓйØMySQLÊý¾Ý¿â·½ÃæµÄ²Ù×÷
±ØÐëÊ×ÏȵǼµ½mysqlÖУ¬ÓйزÙ×÷¶¼ÊÇÔÚmysqlµÄÌáʾ·ûϽøÐУ¬¶øÇÒÿ¸öÃüÁîÒԷֺŽáÊø
1¡¢ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
2¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql£» £¯£¯´ò¿ª¿â
show tables;
3¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±íÃû;
4¡¢½¨¿â£º
create database ¿âÃû;
5¡¢½¨±í£º
use ¿âÃû£»
create table ±íÃû(×Ö¶ÎÉ趨Áбí)£»
6¡¢É¾¿âºÍɾ±í:
drop database ¿âÃû;
drop table ±íÃû£»
7¡¢½«±íÖмǼÇå¿Õ£º
delete from ±íÃû;
8¡¢ÏÔʾ±íÖеļǼ£º
select * from ±íÃû;
9¡¢±àÂëµÄÐÞ¸Ä
Èç¹ûÒª¸Ä±äÕû¸ömysqlµÄ±àÂë¸ñʽ£º
Æô¶¯mysqlµÄʱºò£¬mysqld_safeÃüÁîÐмÓÈë
--default-character-set=gbk
Èç¹ûÒª¸Ä±äij¸ö¿âµÄ±àÂë¸ñʽ£ºÔÚmysqlÌáʾ·ûºóÊäÈëÃüÁî
alter database db_name default character set gbk;
Èý¡¢Êý¾ÝµÄµ¼Èëµ¼³ö
1¡¢Îı¾Êý¾Ýתµ½Êý¾Ý¿âÖÐ
Îı¾Êý¾ÝÓ¦·ûºÏµÄ¸ñʽ£º×Ö¶ÎÊý¾ÝÖ®¼äÓÃtab¼ü¸ô¿ª£¬nullÖµÓÃÀ´´úÌæ¡£Àý£º
1 name duty 2006-11-23
Êý¾Ý´«ÈëÃüÁî load data local infile "ÎļþÃû" into table ±íÃû;
2¡¢µ¼³öÊý¾Ý¿âºÍ±í
mysqldump --opt news > news.sql£¨½«Êý¾Ý¿ânewsÖеÄËùÓÐ±í±¸·Ýµ½news.sqlÎļþ£¬news.sqlÊÇÒ»¸öÎı¾Îļþ£¬ÎļþÃûÈÎÈ¡¡££©
mysqldump --opt news author arti


Ïà¹ØÎĵµ£º

Óà PHP µ÷Óà MySQL ´æ´¢¹ý³Ì

    MySQL 5.0 ÒÔÉÏÖ§³Ö´æ´¢¹ý³Ì¡£
    PHP 5.0 ÒÔÉ쵀 mysqli ϵÁк¯Êý¿ÉÒÔÖ§³Ö²Ù×÷ MySQL µÄ´æ´¢¹ý³Ì¡£
    ÒÔÏÂÊÇһЩ¼òµ¥µÄ´æ´¢¹ý³ÌºÍÓà PHP µ÷ÓõÄʾÀý¡£     Ò»¡¢·µ»Øµ¥¸öÊý¾Ý: 1: <?php
2: header("Content-Type:t ......

MYSQL ´¥·¢Æ÷


´¥·¢Æ÷ÔÚmysqlÖÐÓ¦ÓõIJ»¶à,ËüÊÇÔÚmysql5ÒÔÉϲſªÊ¼Ö§³ÖµÄ,²»Ö§³Ö²»´ú±íËü²»ÖØÒª,Ê×ÏÈÁ˽âÒ»ÏÂʲôÊÇ´¥·¢Æ÷.´¥·¢Æ÷ÊÇÔÚÊý¾Ý¿âÖÐΪÏìÓ¦Ò»¸öÌØÊâ±í¸ñÖеÄijЩʼþ¶ø×Ô¶¯Ö´ÐеijÌÐò´úÂë¡£(Wikipedia)˵µÃ¼òµ¥Ò»Ð©£¬ËüÊÇÔÚÒ»¸öÌØÊâµÄÊý¾Ý¿âʼþ£¬ÈçINSERT»òDELETE·¢Éúʱ£¬×Ô¶¯¼¤»îµÄÒ»¶Î´úÂë¡£´¥·¢Æ÷¿É·½±ãµØÓÃÓÚÈÕÖ¾¼Ç¼¡¢¶Ô ......

ÓÃSource Insight½¨Á¢Ò»¸öLinuxÄں˴úÂ빤³Ì


¾ßÌå²½ÖèÈçÏ£º
£¨Ò»£©´ò¿ªSource Insight£¬µ¥»÷¡¾ÏîÄ¿¡¿°´Å¥£¬µ¯³öÏÂÀ­²Ëµ¥¡£
£¨¶þ£©µ¥»÷¡¾ÐÂÏîÄ¿¡¿°´Å¥£¬µ¯³ö¡¾ÐÂÏîÄ¿¡¿¶Ô»°¿ò£¬ÊäÈëÏîÄ¿ÃûºÍ´æ·Å·¾¶£¬µ¥»÷¡¾È·¶¨¡¿°´Å¥¡£Èçͼ1Ëùʾ¡£
 
ͼ1 ÐÂÏîÄ¿¶Ô»°¿ò
ÎÄÕÂÀ´Ô´£ºhttp://top-e.org/jiaoshi/html/539.html
£¨Èý£©µ¯³ö¡¾Ìí¼Óɾ³ýÎļþ¡¿¶Ô»°¿ò£¬ÔÚÄÚºËÔ´´ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ