1, create a stored procedure in mysql;
1, copy sp.sql to /root/ on dev01o
2, log on mysql
3, source /root/sp.sql
2, delete devices where id>24000;
5, export device data:
1: create an view in mysql
create view view_devices as select `d`.`Id` AS `Id`,`d`.`Udid` AS `Udid`,`d`.`SerialNumber` AS `SerialNumber`,`d`.`MacAddress` AS `MacAddress`,`d`.`Imei` AS `Imei`,`d`.`AssetNumber` AS `AssetNumber`,`d`.`DeviceFriendlyName` AS `DeviceFriendlyName`,`g`.`Name` AS `LocationGroupName`,`l`.`DisplayName` AS `GroupLocation`,`u`.`UserNam
1, copy sp.sql to /root/ on dev01o
2, log on mysql
3, source /root/sp.sql
2, delete devices where id>24000;
3, delete users where id >6000;
5, export device data:
1: create an view in mysql
create view view_devices as select `d`.`Id` AS `Id`,`d`.`Udid` AS `Udid`,`d`.`SerialNumber` AS `SerialNumber`,`d`.`MacAddress` AS `MacAddress`,`d`.`Imei` AS `Imei`,`d`.`AssetNumber` AS `AssetNumber`,`d`.`DeviceFriendlyName` AS `DeviceFriendlyName`,`g`.`Name` AS `LocationGroupName`,`l`.`DisplayName` AS `GroupLocation`,`u`.`UserNam