C:\Documents and Settings\Administrator>mysql -u root -p
Enter password: ******
mysql> drop database mmorpg;
mysql> show databases;
mysql> use mmorpg;
mysql> show tables;
mysql> show slave status\G;
mysql>show columns from 表名;
mysql>show create table 表名;
原有一unique索引AK_PAS_Name(PAC_Name)在表tb_webparamcounter中,
执行以下sql修改索引
alter table tb_webparamcounter drop index AK_PAS_Name;
alter table tb_webparamcounter add UNIQUE AK_PAS_Name(PC_ID,PAC_Name);
若发现索引的逻辑不对,还需要再加一个字段进去,执行
alter table tb_webparamcounter drop index AK_PAS_Name;
alter table tb_webparamcounter add UNIQUE AK_PAS_Name(PC_ID,PAC_Name,PAC_Value);
注意:这时的PC_ID,PAC_Name,PAC_Value三个字段不是FOREIGN KEY
否则必需先drop FOREIGN KEY,再重做上一步才行
9mysql中导入.sql文件
bin]$ ./catalina.sh stop
Stop fail,设置环境在关闭
bin]$source /etc/profile
bin]$ ./catalina.sh start
bin]$ tail -n 200 logs/catalina.out -f
bin]$ ps -ef|grep apache
bin]$ ps -ef | grep mysql