MySql³£ÓÃÃüÁî
Æô¶¯£ºnet start mySql;
½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
ÁгöÊý¾Ý¿â£ºshow databases;
Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
Áгö±í¸ñ£ºshow tables£»
ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
½¨Á¢Êý¾Ý¿â£ºsource fileName.txt;
Æ¥Åä×Ö·û£º¿ÉÒÔÓÃͨÅä·û_´ú±íÈκÎÒ»¸ö×Ö·û£¬£¥´ú±íÈκÎ×Ö·û´®;
Ôö¼ÓÒ»¸ö×ֶΣºalter table tabelName add column fieldName dateType;
Ôö¼Ó¶à¸ö×ֶΣºalter table tabelName add column fieldName1 dateType,add columns fieldName2 dateType;
¶àÐÐÃüÁîÊäÈë:×¢Òâ²»Äܽ«µ¥´Ê¶Ï¿ª;µ±²åÈë»ò¸ü¸ÄÊý¾Ýʱ£¬²»Äܽ«×ֶεÄ×Ö·û´®Õ¹¿ªµ½¶àÐÐÀ·ñÔòÓ²»Ø³µ½«±»´¢´æµ½Êý¾ÝÖÐ;
Ôö¼ÓÒ»¸ö¹ÜÀíÔ±ÕÊ»§£ºgrant all on *.* to user@localhost identified by "password";
ÿÌõÓï¾äÊäÈëÍê±ÏºóÒªÔÚĩβÌî¼Ó·ÖºÅ';'£¬»òÕßÌî¼Ó'\g'Ò²¿ÉÒÔ£»
²éѯʱ¼ä£ºselect now();
²éѯµ±Ç°Óû§£ºselect user();
²éѯÊý¾Ý¿â°æ±¾£ºselect version();
²éѯµ±Ç°Ê¹ÓõÄÊý¾Ý¿â£ºselect database();
1¡¢É¾³ýstudent_courseÊý¾Ý¿âÖеÄstudentsÊý¾Ý±í£º
rm -f student_course/students.*
2¡¢±¸·ÝÊý¾Ý¿â£º(½«Êý¾Ý¿âtest±¸·Ý)
mysqldump -u root -p test>c:\test.txt
±¸·Ý±í¸ñ£º(±¸·ÝtestÊý¾Ý¿âϵÄmytable±í¸ñ)
mysqldump -u root -p test mytable>c:\test.txt
½«±¸·ÝÊý¾Ýµ¼Èëµ½Êý¾Ý¿â£º(µ¼»ØtestÊý¾Ý¿â)
mysql -u root -p test
3¡¢´´½¨ÁÙʱ±í£º(½¨Á¢ÁÙʱ±ízengchao)
create temporary table zengchao(name varchar(10));
4¡¢´´½¨±íÊÇÏÈÅжϱíÊÇ·ñ´æÔÚ
create table if not exists students(……);
5¡¢´ÓÒѾÓеıíÖи´ÖƱíµÄ½á¹¹
create table table2 select * from table1 where 1<>1;
6¡¢¸´ÖƱí
create table table2 select * from table1;
7¡¢¶Ô±íÖØÐÂÃüÃû
alter table table1 rename as table2;
8¡¢ÐÞ¸ÄÁеÄÀàÐÍ
alter table table1 modify id int unsigned;//ÐÞ¸ÄÁÐidµÄÀàÐÍΪint unsigned
alt
Ïà¹ØÎĵµ£º
¡ù ¹ØÓÚMySQLµÄ1067´íÎó½â¾ö·½·¨ ¡ù
ÄÚÈÝ£º
*************
1
°²×°MYSQLºó¸ü¸ÄÁËROOTµÄÃÜÂëºóÓÃ
net startmysql
Æô¶¯Ê±ÎÒ¾ÍÓöµ½ÁËÕâÑùµÄÎÊÌ⣮ʹÓÃÒÔÏÂÃüÁîºó
c:\mysql\bin\mysqladmin-u root -p shutdown
ÔÙnet start mysql¾ÍûÓÐÕâ¸ö´íÎóÌáʾÁË!
*************
2
MySQLµÄ1067´íÎó
Q£ºÎÒµÄMysqlÅöµ½ÁË 1 ......
1 °²×°MySQL5
ÓÃÏÂÁÐÃüÁî°²×°MySQL£º
yum install mysql mysql-server
È»ºóÎÒÃÇΪMySQL´´½¨ÏµÍ³Æô¶¯Á´½Ó£¨ÕâÑùµÄ»°£¬MySQL¾Í»áËæ×ÅϵͳÆô¶¯¶øÆô¶¯£©£¬²¢Æô¶¯MySQL·þÎñÆ÷£º
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
ÔËÐÐ
mysqladmin -u root password yourrootsqlpassword
À´ÎªrootÓû§ÉèÖà ......
À´Ô´£ºhttp://www.sudone.com/linux/mysql_debug.html
×÷ÕߣºAyou
ÎÒÒ»Ö±ÊÇʹÓÃmysqlÕâ¸öÊý¾Ý¿âÈí¼þ£¬Ëü¹¤×÷±È½ÏÎȶ¨£¬Ð§ÂÊÒ²ºÜ¸ß¡£ÔÚÓöµ½ÑÏÖØÐÔÄÜÎÊÌâʱ£¬Ò»°ã¶¼ÓÐÕâô¼¸ÖÖ¿ÉÄÜ£º
1¡¢Ë÷ÒýûÓн¨ºÃ£»
2¡¢sqlд·¨¹ýÓÚ¸´ÔÓ£»
3¡¢ÅäÖôíÎó£»
4¡¢»úÆ÷ʵÔÚ¸ººÉ²»ÁË£»
1¡¢Ë÷ÒýûÓн¨ºÃ
Èç¹û¿´µ½mysqlÏûºÄµÄcpuºÜ´ó£¬¿ÉÒÔÓ ......
PHPnow ÊÇʲô?
Win32 ÏÂÂÌÉ«Ãâ·ÑµÄ Apache + PHP + MySQL »·¾³Ì×¼þ°ü¡£
¼òÒ×°²×°¡¢¿ìËٴ֧³ÖÐéÄâÖ÷»úµÄ PHP »·¾³¡£¸½´ø PnCp.cmd ¿ØÖÆÃæ°å£¬°ïÖúÄã¿ìËÙÅäÖÃÄãµÄÌ×¼þ£¬Ê¹Ó÷dz£·½±ã¡£
PHPnow ÊÇÂÌÉ«µÄ£¬½âѹºóÖ´ÐÐ Init.cmd ³õʼ»¯£¬¼´¿ÉµÃµ½Ò»¸ö PHP + MySQL »·¾³¡£
È»ºó¾Í¿ÉÒÔÖ±½Ó°²×° Discuz!, PHPWind, ......