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

mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×ֶεÈ

À´Ô´£ºhttp://www.blogjava.net/Alpha/archive/2007/07/23/131912.html 
//Ö÷¼ü549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//ɾ³ýÁÐ549830479
alter table t2 drop column c;
//ÖØÃüÃûÁÐ549830479
alter table t1 change a b integer;
//¸Ä±äÁеÄÀàÐÍ549830479
alter table t1 change b b bigint not null;
alter table infos change list list tinyint not null default '0';
//ÖØÃüÃû±í549830479
alter table t1 rename t2;
¼ÓË÷Òý549830479
mysql> alter table tablename change depno depno int(5) not null;
mysql> alter table tablename add index Ë÷ÒýÃû (×Ö¶ÎÃû1[£¬×Ö¶ÎÃû2 …]);
mysql> alter table tablename add index emp_name (name);
¼ÓÖ÷¹Ø¼ü×ÖµÄË÷Òý549830479
mysql> alter table tablename add primary key(id);
¼ÓΨһÏÞÖÆÌõ¼þµÄË÷Òý549830479
mysql> alter table tablename add unique emp_name2(cardnumber);
ɾ³ýij¸öË÷Òý549830479
mysql>alter table tablename drop index emp_name;
ÐÞ¸Ä±í£º549830479
Ôö¼Ó×ֶΣº549830479
mysql> ALTER TABLE table_name ADD field_name field_type;
ÐÞ¸ÄÔ­×Ö¶ÎÃû³Æ¼°ÀàÐÍ£º549830479
mysql> ALTER TABLE table_name CHANGE old_field_name new_field_name field_type;
ɾ³ý×ֶΣº549830479
mysql> ALTER TABLE table_name DROP field_name;


Ïà¹ØÎĵµ£º

mysqlÔ¶³ÌȨÏÞÉèÖÃ

 1¡¢½øÈëmysql£¬´´½¨Ò»¸öÐÂÓû§xuys£º
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿âÃû.±íÃû Óû§@µÇ¼Ö÷»ú identified by "Óû§ÃÜÂë";
grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234";
   ²é¿´½á¹û£¬Ö´ÐУº
   use mysql;
   select host,user,p ......

¿ÉÁ¯µÄSun¹«Ë¾£¬ÒòΪÊÕ¹ºÁËMySQL£¬ÏëÂô×Ô¼º¶¼Âô²»ÁËÁË

write by ¾ÅÌìÑãôá(JTianLing) -- blog.csdn.net/vagrxie ÌÖÂÛÐÂÎÅ×é¼°Îļþ ½ñÌì¿´µ½CSDNÉϵÄÒ»ÔòÐÂÎÅ¡¶Å·ÃËÕýʽ·ñ¾ö¼×¹ÇÎÄÊÕ¹ºSun ¼×¹ÇÎľÝÀíÁ¦Õù¡·ºóÕæÊǸÐ̾°¡¡£¡£¡£¡£ SunÒ²ËãÊÇÊ¢¼«Ò»Ê±µÄ´ó¹«Ë¾ÁË£¬ÒòΪJAVAÓïÑÔ¶øÎÅÃûÓÚÊÀ£¬ºóÀ´¹ÉƱ´úÂ붼¸Ä³ÉJAVAÁË£¬ËäÈ»JAVAʵ¼ÊÉÏûÓÐΪÆä´øÀ´Ì«¶àµÄÀûÈ󣬵«ÊÇSunÒ²ËãÊÇÄܹ»×Ô¼ ......

½â¾öÈçºÎÐÞ¸Ämysql·þÎñÆ÷¼àÌý¶Ë¿ÚµÄÎÊÌâ

 1£©Èç¹ûÄã°²×°µÄÊÇϵͳ×Ô´øµÄrpm°üµÄÇé¿ö£º
ÐÞ¸Ä /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
port=3300                    #Ð޸ijÉÄã×Ô¼ºÏëÒªµÄ¶Ë¿Ú
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/var/lib
[safe_m ......

LinuxÏÂMysql°²×°ºÍÅäÖÃ2

 LinuxÏÂmysqlµÄ°²×°²½Ö裨·Çrpm°²×°£©
1 ÏÂÔØmysql-standard-5.0.27-linux-i686-glibc23.tar.gz °ü
2 ½âѹµ½°²×°Ä¿Â¼£º tar -zxvf /edass/db/mysql-standard-5.0.27-linux-i686-glibc23.tar.gz
3 ½«  mysql-standard-5.0.27-linux-i686-glibc23Á´½Óµ½mysql : ln –s mysql-standard-5.0.27-linux-i686 ......

Mysql¡¢Apache¡¢PhpµÄжÔØ (Linux)

 Ð¶ÔØMysql
[root@localhost ~]# rpm -qa | grep mysql
mysql-3.23.58-9
php-mysql-4.3.4-11
mod_auth_mysql-20030510-4.1
mysql-server-3.23.58-9
˵Ã÷£ºrpm –qa | grep mysql ÃüÁîÊÇΪÁË°ÑmysqlÏà¹ØµÄ°ü¶¼ÁгöÀ´£¬Ð¶Ôض¼´Ó×îÏÂÃæµÄÒ»¸ö°ü¿ªÊ¼£¬Ö±µ½Ð¶ÔصôµÚÒ»¸öΪֹ¡£Ö´ÐÐrpm -q php£¬Èç¹û·µ»Øphp°æ±¾£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ