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
Ïà¹ØÎĵµ£º
MySQL 5.0 ÒÔÉÏÖ§³Ö´æ´¢¹ý³Ì¡£
PHP 5.0 ÒÔÉ쵀 mysqli ϵÁк¯Êý¿ÉÒÔÖ§³Ö²Ù×÷ MySQL µÄ´æ´¢¹ý³Ì¡£
ÒÔÏÂÊÇһЩ¼òµ¥µÄ´æ´¢¹ý³ÌºÍÓà PHP µ÷ÓõÄʾÀý¡£ Ò»¡¢·µ»Øµ¥¸öÊý¾Ý: 1: <?php
2: header("Content-Type:t ......
´¥·¢Æ÷ÔÚmysqlÖÐÓ¦ÓõIJ»¶à,ËüÊÇÔÚmysql5ÒÔÉϲſªÊ¼Ö§³ÖµÄ,²»Ö§³Ö²»´ú±íËü²»ÖØÒª,Ê×ÏÈÁ˽âÒ»ÏÂʲôÊÇ´¥·¢Æ÷.´¥·¢Æ÷ÊÇÔÚÊý¾Ý¿âÖÐΪÏìÓ¦Ò»¸öÌØÊâ±í¸ñÖеÄijЩʼþ¶ø×Ô¶¯Ö´ÐеijÌÐò´úÂë¡£(Wikipedia)˵µÃ¼òµ¥Ò»Ð©£¬ËüÊÇÔÚÒ»¸öÌØÊâµÄÊý¾Ý¿âʼþ£¬ÈçINSERT»òDELETE·¢Éúʱ£¬×Ô¶¯¼¤»îµÄÒ»¶Î´úÂë¡£´¥·¢Æ÷¿É·½±ãµØÓÃÓÚÈÕÖ¾¼Ç¼¡¢¶Ô ......
1.Ê×ÏÈ£¬ÉèÖÃÊý¾Ý¿âÖ§³ÖÖÐÎÄgb2312/gbk¡£
¾ßÌå·½·¨£º
´ò¿ªmySQLÎļþ¼Ð£¬ÐÞ¸Ämy.iniÅäÖÃÎļþ¡£
[client]
port=3306
default-character-set=gb2312
ÒÔ¼°
[mysqld]쵀
default-character-set=gb2312
Ð޸ģ¬±£´æ£¬ÖØÆô¡£ÈôÉèΪSystem·þÎñ£¬¿ÉÒÔÔÚ¿ØÖÆÃæ°å-¹ÜÀí¹¤¾ß-·þÎñÖÐÕÒµ½mySQL·þÎñ£¬ÖØÆô¡£
2.±£Ö¤Web ......
¼ÇµÃÎÒÃÇÔÚÉÏƪÎÄÕÂmem_init()·ÖÎöÖÐÌáµ½__free_page()º¯ÊýÂð£¿ÎÒÃÇÏÖÔÚÀ´ÍêÉÆËü¡£ËüµÄµ÷Óùý³ÌÊÇÕâÑùµÄ£ºmem_init()->free_all_bootmem_node():ÎÒÃÇÖªµÀÕâ¸öº¯ÊýÊÇͳ¼ÆÒ»¹²ÊÍ·ÅÁ˶àÉÙ¿ÕÏÐÒ³¡£->free_all_bootmem_core()¾ÍÊÇÔÚÕâ¸öº¯ÊýÀïÃæÏȺó¶à´Îµ÷ÓÃ__free_pages()º¯Êý¡£Ä¿µÄ¾ÍÊÇΪÁËÊÍ·Åÿ¸öÄÚ´ænodeÀïÃæÎ ......