<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:href="sanm-20190330.xsd#AccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:href="sanm-20190330.xsd#CondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:href="sanm-20190330.xsd#CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncomeLoss" xlink:href="sanm-20190330.xsd#CondensedConsolidatedStatementOfComprehensiveIncomeLoss" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:href="sanm-20190330.xsd#CondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfOperations" xlink:href="sanm-20190330.xsd#CondensedConsolidatedStatementsOfOperations" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:href="sanm-20190330.xsd#CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/DeiDocument" xlink:href="sanm-20190330.xsd#DeiDocument" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10StockRepurchaseDetails" xlink:href="sanm-20190330.xsd#Note10StockRepurchaseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10StockholdersEquity" xlink:href="sanm-20190330.xsd#Note10StockholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10StockholdersEquityDetails" xlink:href="sanm-20190330.xsd#Note10StockholdersEquityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note10StockholdersEquityTables" xlink:href="sanm-20190330.xsd#Note10StockholdersEquityTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11BusinessSegmentGeographicAndCustomerInformation" xlink:href="sanm-20190330.xsd#Note11BusinessSegmentGeographicAndCustomerInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11BusinessSegmentGeographicAndCustomerInformationTables" xlink:href="sanm-20190330.xsd#Note11BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11RevenueAndGrossProfitBySegmentDetails" xlink:href="sanm-20190330.xsd#Note11RevenueAndGrossProfitBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note11SegmentReportingByGeographicSegmentDetails" xlink:href="sanm-20190330.xsd#Note11SegmentReportingByGeographicSegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12EarningsPerShare" xlink:href="sanm-20190330.xsd#Note12EarningsPerShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12EarningsPerShareDetails" xlink:href="sanm-20190330.xsd#Note12EarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note12EarningsPerShareTables" xlink:href="sanm-20190330.xsd#Note12EarningsPerShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13RestrictedStockRollforwardDetails" xlink:href="sanm-20190330.xsd#Note13RestrictedStockRollforwardDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13ShareBasedCompensationArrangementsDetails" xlink:href="sanm-20190330.xsd#Note13ShareBasedCompensationArrangementsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:href="sanm-20190330.xsd#Note13SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13StockBasedCompensation" xlink:href="sanm-20190330.xsd#Note13StockBasedCompensation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13StockBasedCompensationTables" xlink:href="sanm-20190330.xsd#Note13StockBasedCompensationTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note13UnrecognizedStockBasedCompensationExpenseDetails" xlink:href="sanm-20190330.xsd#Note13UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:href="sanm-20190330.xsd#Note1BasisOfPresentation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note1RevenueBeginningBalanceAdjustmentsDetails" xlink:href="sanm-20190330.xsd#Note1RevenueBeginningBalanceAdjustmentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2Inventories" xlink:href="sanm-20190330.xsd#Note2Inventories" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:href="sanm-20190330.xsd#Note2InventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note2InventoriesTables" xlink:href="sanm-20190330.xsd#Note2InventoriesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:href="sanm-20190330.xsd#Note3DisagregationOfRevenueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:href="sanm-20190330.xsd#Note3RevenueRecognition" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:href="sanm-20190330.xsd#Note3RevenueRecognitionTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:href="sanm-20190330.xsd#Note4DerivativeFinancialInstrumentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:href="sanm-20190330.xsd#Note4DerivativesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FairValueDetails" xlink:href="sanm-20190330.xsd#Note4FairValueDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:href="sanm-20190330.xsd#Note4FinancialInstruments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5Debt" xlink:href="sanm-20190330.xsd#Note5Debt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:href="sanm-20190330.xsd#Note5DebtScheduleDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5DebtTables" xlink:href="sanm-20190330.xsd#Note5DebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:href="sanm-20190330.xsd#Note5LineOfCreditFacilityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6AccountsReceivableSaleProgram" xlink:href="sanm-20190330.xsd#Note6AccountsReceivableSaleProgram" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note6AccountsReceivableSaleProgramDetails" xlink:href="sanm-20190330.xsd#Note6AccountsReceivableSaleProgramDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7CommitmentsAndContingencies" xlink:href="sanm-20190330.xsd#Note7CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note7ContingenciesDetails" xlink:href="sanm-20190330.xsd#Note7ContingenciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8Restructuring" xlink:href="sanm-20190330.xsd#Note8Restructuring" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8RestructuringAndRelatedActivitiesTables" xlink:href="sanm-20190330.xsd#Note8RestructuringAndRelatedActivitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note8RestructuringDetails" xlink:href="sanm-20190330.xsd#Note8RestructuringDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9IncomeTax" xlink:href="sanm-20190330.xsd#Note9IncomeTax" xlink:type="simple" />
  <link:roleRef roleURI="http://www.sanmina.com/role/Note9IncomeTaxDetails" xlink:href="sanm-20190330.xsd#Note9IncomeTaxDetails" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/AccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_FFF1533240F9FE6B75C346BA031AFD8C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_0D40B9BDE40C545B6C1346BA031954BE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_FFF1533240F9FE6B75C346BA031AFD8C" xlink:to="loc_us-gaap_StatementTable_0D40B9BDE40C545B6C1346BA031954BE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_F47AE451ED892BD8CBA846BA03192100" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_0D40B9BDE40C545B6C1346BA031954BE" xlink:to="loc_us-gaap_StatementClassOfStockAxis_F47AE451ED892BD8CBA846BA03192100" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D8D7F0000DB06AD4C57A46BA03197392_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F47AE451ED892BD8CBA846BA03192100" xlink:to="loc_us-gaap_ClassOfStockDomain_D8D7F0000DB06AD4C57A46BA03197392_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D8D7F0000DB06AD4C57A46BA03197392" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F47AE451ED892BD8CBA846BA03192100" xlink:to="loc_us-gaap_ClassOfStockDomain_D8D7F0000DB06AD4C57A46BA03197392" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_FFF1533240F9FE6B75C346BA031AFD8C" xlink:to="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrentAbstract" xlink:label="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:to="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_0057177625083E87E10B46BA031AEE85" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_0057177625083E87E10B46BA031AEE85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsAndOtherReceivablesNetCurrent" xlink:label="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_0AF73915DDF38C08EB6E46BA031A022E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_AccountsAndOtherReceivablesNetCurrent_0AF73915DDF38C08EB6E46BA031A022E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_E52F190EC174732F8E0C46BA031B1C31" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_E52F190EC174732F8E0C46BA031B1C31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_7E14ED5E9DE795E27B5346BA031B3F03" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_InventoryNet_7E14ED5E9DE795E27B5346BA031B3F03" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_6884DDFDAB5D097D43A146BA031B0BBA" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_6884DDFDAB5D097D43A146BA031B0BBA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="loc_us-gaap_AssetsCurrent_91DDF798273503D9C4BF46BA031BDD15" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_AE96F60F8987F8C23E6046BA031A3623" xlink:to="loc_us-gaap_AssetsCurrent_91DDF798273503D9C4BF46BA031BDD15" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_C39E2EDC5843D551876F46BA031BBD82" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_C39E2EDC5843D551876F46BA031BBD82" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxAssetsNet" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_8126481A70D8D765454B46BA031BA8CD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_8126481A70D8D765454B46BA031BA8CD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_D0A17F2A409A3B2E23A446BA031BFC93" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_D0A17F2A409A3B2E23A446BA031BFC93" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_56EF9430642CE4F12B4046BA031C05C3" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_69771BC354D67ACCE63646BA031A0CF8" xlink:to="loc_us-gaap_Assets_56EF9430642CE4F12B4046BA031C05C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_FFF1533240F9FE6B75C346BA031AFD8C" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrentAbstract" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="loc_us-gaap_AccountsPayableCurrent_F172EBF529992599D68146BA031CADBE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:to="loc_us-gaap_AccountsPayableCurrent_F172EBF529992599D68146BA031CADBE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesCurrent" xlink:label="loc_us-gaap_OtherLiabilitiesCurrent_5992E063F3922412092146BA031DA466" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:to="loc_us-gaap_OtherLiabilitiesCurrent_5992E063F3922412092146BA031DA466" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_2FE2F7339C85C05720A046BA031D131A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_2FE2F7339C85C05720A046BA031D131A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtCurrent" xlink:label="loc_us-gaap_DebtCurrent_A7FF7A0A665D2909E75446BA031DEB5B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:to="loc_us-gaap_DebtCurrent_A7FF7A0A665D2909E75446BA031DEB5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="loc_us-gaap_LiabilitiesCurrent_ADA9549D853B7D77FEDD46BA031D0CFE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_42F5412E6E7183613D3846BA031CAAE4" xlink:to="loc_us-gaap_LiabilitiesCurrent_ADA9549D853B7D77FEDD46BA031D0CFE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesNoncurrentAbstract" xlink:label="loc_us-gaap_LiabilitiesNoncurrentAbstract_F738F92314DEBFD7105246BA031D2D12" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:to="loc_us-gaap_LiabilitiesNoncurrentAbstract_F738F92314DEBFD7105246BA031D2D12" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_6673F25D014ED1950E3E46BA031D5A72" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_F738F92314DEBFD7105246BA031D2D12" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_6673F25D014ED1950E3E46BA031D5A72" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_C644E0EE05DD0DA2793146BA031E7DFB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_F738F92314DEBFD7105246BA031D2D12" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_C644E0EE05DD0DA2793146BA031E7DFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesNoncurrent" xlink:label="loc_us-gaap_LiabilitiesNoncurrent_D1CDB221A7E7034BE9C946BA031ECDED" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesNoncurrentAbstract_F738F92314DEBFD7105246BA031D2D12" xlink:to="loc_us-gaap_LiabilitiesNoncurrent_D1CDB221A7E7034BE9C946BA031ECDED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_35412F9DAC7DD5DD293646BA031E7AFB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:to="loc_us-gaap_CommitmentsAndContingencies_35412F9DAC7DD5DD293646BA031E7AFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_FACF7F3AA774EF96C07046BA031E5CD7" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:to="loc_us-gaap_StockholdersEquity_FACF7F3AA774EF96C07046BA031E5CD7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_D98B8DCA87E2763850D546BA031E231C" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_B48ADEF814DE5E44615546BA031C2FCE" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_D98B8DCA87E2763850D546BA031E231C" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_1FFF84BF7AB74D157863E801016E6914" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_B8BDD954C9434ACD61A8E801016ECE96" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1FFF84BF7AB74D157863E801016E6914" xlink:to="loc_us-gaap_StatementTable_B8BDD954C9434ACD61A8E801016ECE96" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementScenarioAxis" xlink:label="loc_us-gaap_StatementScenarioAxis_8D554086874447D24A9AE801016E10CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_B8BDD954C9434ACD61A8E801016ECE96" xlink:to="loc_us-gaap_StatementScenarioAxis_8D554086874447D24A9AE801016E10CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_8EA6AE25BCA8C9FBFE0CE801016E1A27_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementScenarioAxis_8D554086874447D24A9AE801016E10CA" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_8EA6AE25BCA8C9FBFE0CE801016E1A27_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScenarioUnspecifiedDomain" xlink:label="loc_us-gaap_ScenarioUnspecifiedDomain_8EA6AE25BCA8C9FBFE0CE801016E1A27" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementScenarioAxis_8D554086874447D24A9AE801016E10CA" xlink:to="loc_us-gaap_ScenarioUnspecifiedDomain_8EA6AE25BCA8C9FBFE0CE801016E1A27" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent" xlink:label="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_D9FED2688AF5288B0A03E801016EC478" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1FFF84BF7AB74D157863E801016E6914" xlink:to="loc_us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent_D9FED2688AF5288B0A03E801016EC478" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncomeLoss" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_89D7234B15AFE9F316B2DB479886453C" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_06E8BB2D968D5B24A763DB47988556A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_89D7234B15AFE9F316B2DB479886453C" xlink:to="loc_us-gaap_StatementTable_06E8BB2D968D5B24A763DB47988556A8" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_173050456A88DA4B07EBDB479885542F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_06E8BB2D968D5B24A763DB47988556A8" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_173050456A88DA4B07EBDB479885542F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_B3D4A1BFF441CB88CC2ADB479886E313_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_173050456A88DA4B07EBDB479885542F" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_B3D4A1BFF441CB88CC2ADB479886E313_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_B3D4A1BFF441CB88CC2ADB479886E313" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_173050456A88DA4B07EBDB479885542F" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_B3D4A1BFF441CB88CC2ADB479886E313" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_0A4ACCDB76CEB59D10F7DB4798861E1E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_89D7234B15AFE9F316B2DB479886453C" xlink:to="loc_us-gaap_NetIncomeLoss_0A4ACCDB76CEB59D10F7DB4798861E1E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_89D7234B15AFE9F316B2DB479886453C" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_F1EFD458C5971958D5AEDB47988667E2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_F1EFD458C5971958D5AEDB47988667E2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_755CEF5DA60C51E3C617DB4798871D0C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_755CEF5DA60C51E3C617DB4798871D0C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_0C584C22C4EB406F2F12DB47988744B4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_755CEF5DA60C51E3C617DB4798871D0C" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedGainLossOnDerivativesArisingDuringPeriodNetOfTax_0C584C22C4EB406F2F12DB47988744B4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_DCDB2C6A7FB25F4BDED5DB47988764C1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDerivativesQualifyingAsHedgesNetOfTaxPortionAttributableToParentAbstract_755CEF5DA60C51E3C617DB4798871D0C" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIOnDerivativesNetOfTax_DCDB2C6A7FB25F4BDED5DB47988764C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_BAD02A02B63AB7E11ABADB4798875085" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_BAD02A02B63AB7E11ABADB4798875085" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_C014DCDE896E152068F2DB4798874644" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_BAD02A02B63AB7E11ABADB4798875085" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansAdjustmentBeforeReclassificationAdjustmentsNetOfTax_C014DCDE896E152068F2DB4798874644" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_403FF4C474D61774BC16DB479888E70F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlansAdjustmentNetOfTaxPeriodIncreaseDecreaseAbstract_BAD02A02B63AB7E11ABADB4798875085" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansNetOfTax_403FF4C474D61774BC16DB479888E70F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_CCBCF933A7A7BA78BE55DB4798882EAA" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_CCBCF933A7A7BA78BE55DB4798882EAA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_DBCF1363B0B2939AF115DB4798883B1A" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_EC520020CF12B4F790EDDB4798860956" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax_DBCF1363B0B2939AF115DB4798883B1A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfOperations" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_5D00D761D1E8492E0CC669F761E67767" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_StatementTable_5D00D761D1E8492E0CC669F761E67767" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_18F7CFC0555AC8A6C1EA69F761E6F9A8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5D00D761D1E8492E0CC669F761E67767" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_18F7CFC0555AC8A6C1EA69F761E6F9A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_4A7A4C46FC7C0AC7BA7869F761E69794_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_18F7CFC0555AC8A6C1EA69F761E6F9A8" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_4A7A4C46FC7C0AC7BA7869F761E69794_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_4A7A4C46FC7C0AC7BA7869F761E69794" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_18F7CFC0555AC8A6C1EA69F761E6F9A8" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_4A7A4C46FC7C0AC7BA7869F761E69794" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_1E1F62BD966F204AA1A369F761E65236" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_Revenues_1E1F62BD966F204AA1A369F761E65236" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_45E450B07BD225F25BF569F761E6FA06" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_45E450B07BD225F25BF569F761E6FA06" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_8467F4C2A986E5DBA6C969F761E682D0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_GrossProfit_8467F4C2A986E5DBA6C969F761E682D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingExpensesAbstract" xlink:label="loc_us-gaap_OperatingExpensesAbstract_7D28D008697432D9BAB069F761E63691" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_OperatingExpensesAbstract_7D28D008697432D9BAB069F761E63691" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_C4E4775CBE15E793951F69F761E6F1FB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_7D28D008697432D9BAB069F761E63691" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_C4E4775CBE15E793951F69F761E6F1FB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_D33D09BC95154842078969F761E65DAE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_7D28D008697432D9BAB069F761E63691" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_D33D09BC95154842078969F761E65DAE" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_Restructuringandotherexpenserecoverynet" xlink:label="loc_sanm_Restructuringandotherexpenserecoverynet_07491C99BA2BCA8B212369F761E6C231" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingExpensesAbstract_7D28D008697432D9BAB069F761E63691" xlink:to="loc_sanm_Restructuringandotherexpenserecoverynet_07491C99BA2BCA8B212369F761E6C231" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_A8135C1A0CAFE49BDF9B69F761E61422" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_OperatingExpenses_A8135C1A0CAFE49BDF9B69F761E61422" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_FA215B0A49D23217DC0F69F761E67F86" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_OperatingIncomeLoss_FA215B0A49D23217DC0F69F761E67F86" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestAndOtherIncome" xlink:label="loc_us-gaap_InterestAndOtherIncome_0672170988965CEB81B069F761E653A8" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_InterestAndOtherIncome_0672170988965CEB81B069F761E653A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_4B98B9B538EB2D7E710469F761E6320A" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_InterestExpense_4B98B9B538EB2D7E710469F761E6320A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_63F4300A3D76D3DF85D669F761E67541" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_63F4300A3D76D3DF85D669F761E67541" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NonoperatingIncomeExpense" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_5B2EFAF08B3B9E6FE4C969F761E66EE4" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_5B2EFAF08B3B9E6FE4C969F761E66EE4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_AEF989F58D900A1AA8EE69F761E670ED" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments_AEF989F58D900A1AA8EE69F761E670ED" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_33A1F7D7BD5BBA99E43E69F761E66824" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_33A1F7D7BD5BBA99E43E69F761E66824" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_F93F32A887F47685760B69F761E63061" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_NetIncomeLoss_F93F32A887F47685760B69F761E63061" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EarningsPerShareAbstract" xlink:label="loc_us-gaap_EarningsPerShareAbstract_E131CCE6465ACA8F605569F761E6B545" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_EarningsPerShareAbstract_E131CCE6465ACA8F605569F761E6B545" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:label="loc_us-gaap_EarningsPerShareBasic_BD2A27B278B99736AFFF69F761E6BB36" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareAbstract_E131CCE6465ACA8F605569F761E6B545" xlink:to="loc_us-gaap_EarningsPerShareBasic_BD2A27B278B99736AFFF69F761E6BB36" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:label="loc_us-gaap_EarningsPerShareDiluted_C5439687093F04B1666969F761E66613" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareAbstract_E131CCE6465ACA8F605569F761E6B545" xlink:to="loc_us-gaap_EarningsPerShareDiluted_C5439687093F04B1666969F761E66613" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_81DFC97B6A5DCD379AD569F761E694B1" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_EFE6F7FAE153D1BBB7D569F761E662C0" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_81DFC97B6A5DCD379AD569F761E694B1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_792A6ADFE0004C5A800B69F761E602C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_81DFC97B6A5DCD379AD569F761E694B1" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_792A6ADFE0004C5A800B69F761E602C6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_77364B6BA47DB9A66E4F69F761E6F4BE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract_81DFC97B6A5DCD379AD569F761E694B1" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_77364B6BA47DB9A66E4F69F761E6F4BE" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/CondensedConsolidatedStatementsOfStockholdersEquityStatement" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_70B409626F5C2AB5C4046ACAB0AA3F31" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_306EC46454121B78DDB06ACAB09AFF46" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_70B409626F5C2AB5C4046ACAB0AA3F31" xlink:to="loc_us-gaap_StatementTable_306EC46454121B78DDB06ACAB09AFF46" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_C1B0F4546CA2C46B77966ACAB09A6D6B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_306EC46454121B78DDB06ACAB09AFF46" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_C1B0F4546CA2C46B77966ACAB09A6D6B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_C1B0F4546CA2C46B77966ACAB09A6D6B" xlink:to="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_C1B0F4546CA2C46B77966ACAB09A6D6B" xlink:to="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember_0F113CEE1E129CD0E50A6ACAB0AA26E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:to="loc_us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember_0F113CEE1E129CD0E50A6ACAB0AA26E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockMember" xlink:label="loc_us-gaap_TreasuryStockMember_6834A41FC6D889F080006ACAB0AA40FA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:to="loc_us-gaap_TreasuryStockMember_6834A41FC6D889F080006ACAB0AA40FA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_F67DC7171FC30ACEE8A76ACAB0AA79B2" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_F67DC7171FC30ACEE8A76ACAB0AA79B2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_23147A1A45E34F2F440E6ACAB0AA0E30" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:to="loc_us-gaap_RetainedEarningsMember_23147A1A45E34F2F440E6ACAB0AA0E30" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_NumberofCommonSharesMember" xlink:label="loc_sanm_NumberofCommonSharesMember_59E18B728B6CBD4E19C36ACAB0AABC6F" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_17BCE6730933893641266ACAB0AAFC5B" xlink:to="loc_sanm_NumberofCommonSharesMember_59E18B728B6CBD4E19C36ACAB0AABC6F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_70B409626F5C2AB5C4046ACAB0AA3F31" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_A4BB96882FC2234D856B6ACAB0AABDA1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_StockholdersEquity_A4BB96882FC2234D856B6ACAB0AABDA1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_7816C43E7077B1F7A1E56ACAB0AA4402" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_7816C43E7077B1F7A1E56ACAB0AA4402" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockShares" xlink:label="loc_us-gaap_TreasuryStockShares_ECE8A4D664B1A1F462476ACAB0AA05AD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_TreasuryStockShares_ECE8A4D664B1A1F462476ACAB0AA05AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_6E4675B84413730267E26ACAB0AACF06" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_6E4675B84413730267E26ACAB0AACF06" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_D93E987F8E0D310132B86ACAB0AA3172" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_D93E987F8E0D310132B86ACAB0AA3172" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_2350CA8700290E4B5DA46ACAB0AA1F57" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_2350CA8700290E4B5DA46ACAB0AA1F57" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalOther" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_A2A7F6352CB80BD163106ACAB0AAB2D5" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_A2A7F6352CB80BD163106ACAB0AAB2D5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_F0291548442DFEB764606ACAB0AADC59" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_F0291548442DFEB764606ACAB0AADC59" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_49EE2A34654BAA7581E46ACAB0AA4924" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_49EE2A34654BAA7581E46ACAB0AA4924" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_50F684E94677AD8D791B6ACAB0AAEFC0" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_50F684E94677AD8D791B6ACAB0AAEFC0" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CumulativeEffectofNewAccountingPrinciple" xlink:label="loc_sanm_CumulativeEffectofNewAccountingPrinciple_9D4691AF1C22BBAC438C6ACAB0AABA3A" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_sanm_CumulativeEffectofNewAccountingPrinciple_9D4691AF1C22BBAC438C6ACAB0AABA3A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_C24B5210CCB29674BE8D6ACAB0AA8D5A" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1F2B412D32CF51D4B1F56ACAB0AA4063" xlink:to="loc_us-gaap_NetIncomeLoss_C24B5210CCB29674BE8D6ACAB0AA8D5A" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/DeiDocument" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10StockRepurchaseDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10StockholdersEquity" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10StockholdersEquityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_20F30632B726EA3556186ADF0F2BD9BC" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_16F0D72980166A3B95166ADF0F28203E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_20F30632B726EA3556186ADF0F2BD9BC" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_16F0D72980166A3B95166ADF0F28203E" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_6463691FF2AC9697DED06ADF0F40778E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_16F0D72980166A3B95166ADF0F28203E" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_6463691FF2AC9697DED06ADF0F40778E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_FCA0A809279F81FDBE006ADF0F41196B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_6463691FF2AC9697DED06ADF0F40778E" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_FCA0A809279F81FDBE006ADF0F41196B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_FCA0A809279F81FDBE006ADF0F41196B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_6463691FF2AC9697DED06ADF0F40778E" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_FCA0A809279F81FDBE006ADF0F41196B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestRateSwapMember" xlink:label="loc_us-gaap_InterestRateSwapMember_E3A9CD9BE8FDA881F92E6ADF0F512864" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_FCA0A809279F81FDBE006ADF0F41196B" xlink:to="loc_us-gaap_InterestRateSwapMember_E3A9CD9BE8FDA881F92E6ADF0F512864" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_E66714FAF3E5B9F6537E6ADF0F290AEF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_16F0D72980166A3B95166ADF0F28203E" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_E66714FAF3E5B9F6537E6ADF0F290AEF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_1B0B5771251D96E032DC6ADF0F2A984E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_E66714FAF3E5B9F6537E6ADF0F290AEF" xlink:to="loc_us-gaap_EquityComponentDomain_1B0B5771251D96E032DC6ADF0F2A984E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_1B0B5771251D96E032DC6ADF0F2A984E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_E66714FAF3E5B9F6537E6ADF0F290AEF" xlink:to="loc_us-gaap_EquityComponentDomain_1B0B5771251D96E032DC6ADF0F2A984E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_DerivativeNotionalAmount" xlink:label="loc_invest_DerivativeNotionalAmount_C5CB9F633414051927F86ADF0F35FD80" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_20F30632B726EA3556186ADF0F2BD9BC" xlink:to="loc_invest_DerivativeNotionalAmount_C5CB9F633414051927F86ADF0F35FD80" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd" xlink:label="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_6F808F165C14F3961BAC6ADF43E75DCF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_20F30632B726EA3556186ADF0F2BD9BC" xlink:to="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_6F808F165C14F3961BAC6ADF43E75DCF" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note10StockholdersEquityTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11BusinessSegmentGeographicAndCustomerInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11BusinessSegmentGeographicAndCustomerInformationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11RevenueAndGrossProfitBySegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_02CD43A831C20E3AA65B4C5D849CAC72" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_9123003D09F587E944F94C5D849CBCFE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_02CD43A831C20E3AA65B4C5D849CAC72" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_9123003D09F587E944F94C5D849CBCFE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsAxis" xlink:label="loc_srt_ConsolidationItemsAxis_56462C8F2573943FE1764C5D849CBF00" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_9123003D09F587E944F94C5D849CBCFE" xlink:to="loc_srt_ConsolidationItemsAxis_56462C8F2573943FE1764C5D849CBF00" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_56462C8F2573943FE1764C5D849CBF00" xlink:to="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_ConsolidationItemsDomain" xlink:label="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_56462C8F2573943FE1764C5D849CBF00" xlink:to="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_B9CC8BC73E7C6A54F2FD4C5D849C95CF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD" xlink:to="loc_us-gaap_OperatingSegmentsMember_B9CC8BC73E7C6A54F2FD4C5D849C95CF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntersegmentEliminationMember" xlink:label="loc_us-gaap_IntersegmentEliminationMember_EC0A8255496C1DE578994C5D849CCB51" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD" xlink:to="loc_us-gaap_IntersegmentEliminationMember_EC0A8255496C1DE578994C5D849CCB51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MaterialReconcilingItemsMember" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_9E18854F1CD017F4642B4C5D849C30B4" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_253EEDF75BEDD33979554C5D849C64FD" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_9E18854F1CD017F4642B4C5D849C30B4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_E8D393FAF96374D5EC0E4C5D849C8A6D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_9123003D09F587E944F94C5D849CBCFE" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_E8D393FAF96374D5EC0E4C5D849C8A6D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_E8D393FAF96374D5EC0E4C5D849C8A6D" xlink:to="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_E8D393FAF96374D5EC0E4C5D849C8A6D" xlink:to="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IMSMember" xlink:label="loc_sanm_IMSMember_7AC5E3D11C51EAABA78B4C5D849C1A72" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C" xlink:to="loc_sanm_IMSMember_7AC5E3D11C51EAABA78B4C5D849C1A72" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllOtherSegmentsMember" xlink:label="loc_us-gaap_AllOtherSegmentsMember_395B8BDCCDCB370165714C5D849C80B0" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_518DD3337541DF66F1C14C5D849C8E1C" xlink:to="loc_us-gaap_AllOtherSegmentsMember_395B8BDCCDCB370165714C5D849C80B0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_9049D274A73B0C1A732C4C5D849C3534" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_02CD43A831C20E3AA65B4C5D849CAC72" xlink:to="loc_us-gaap_Revenues_9049D274A73B0C1A732C4C5D849C3534" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit" xlink:label="loc_us-gaap_GrossProfit_683B64910AF9A530A7EB4C5D849C52A2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_02CD43A831C20E3AA65B4C5D849CAC72" xlink:to="loc_us-gaap_GrossProfit_683B64910AF9A530A7EB4C5D849C52A2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NumberOfReportableSegments" xlink:label="loc_us-gaap_NumberOfReportableSegments_CC171E35D66E228914654C5D849C9CE0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_02CD43A831C20E3AA65B4C5D849CAC72" xlink:to="loc_us-gaap_NumberOfReportableSegments_CC171E35D66E228914654C5D849C9CE0" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note11SegmentReportingByGeographicSegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:label="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_67D093DCD980FF6E2B25E8010096386D" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:label="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_111246C1771614C3DD50E8010096C638" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_67D093DCD980FF6E2B25E8010096386D" xlink:to="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_111246C1771614C3DD50E8010096C638" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_22D2B4408239313D058DE80100962ED2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable_111246C1771614C3DD50E8010096C638" xlink:to="loc_srt_StatementGeographicalAxis_22D2B4408239313D058DE80100962ED2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_22D2B4408239313D058DE80100962ED2" xlink:to="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_22D2B4408239313D058DE80100962ED2" xlink:to="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_0468D9768CD141A75040E80100967FD7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:to="loc_country_US_0468D9768CD141A75040E80100967FD7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MX" xlink:label="loc_country_MX_54CFA6996CEE6C750D0DE80100964F89" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:to="loc_country_MX_54CFA6996CEE6C750D0DE80100964F89" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_CN" xlink:label="loc_country_CN_7CDF3DB48C62830E2C76E8010096677D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:to="loc_country_CN_7CDF3DB48C62830E2C76E8010096677D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MY" xlink:label="loc_country_MY_0BF4A9892EC76C94491FE80100962197" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:to="loc_country_MY_0BF4A9892EC76C94491FE80100962197" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_OtherInternationalMember" xlink:label="loc_sanm_OtherInternationalMember_ADAE87ABD0A83B0CA100E801009664C1" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_6B94284668335D29E4DFE8010096050D" xlink:to="loc_sanm_OtherInternationalMember_ADAE87ABD0A83B0CA100E801009664C1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_844DE7258E77CE6BCDC3E80100968064" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_67D093DCD980FF6E2B25E8010096386D" xlink:to="loc_us-gaap_Revenues_844DE7258E77CE6BCDC3E80100968064" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers" xlink:label="loc_sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers_DFBA573B7F8FCC2A60F6E8010096399C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_67D093DCD980FF6E2B25E8010096386D" xlink:to="loc_sanm_PercentageOfNetSalesRepresentedByTenLargestCustomers_DFBA573B7F8FCC2A60F6E8010096399C" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_Numberofcustomersrepresenting10ormoreofnetsales" xlink:label="loc_sanm_Numberofcustomersrepresenting10ormoreofnetsales_32311EABD40DEDB14497E8010096DAFD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems_67D093DCD980FF6E2B25E8010096386D" xlink:to="loc_sanm_Numberofcustomersrepresenting10ormoreofnetsales_32311EABD40DEDB14497E8010096DAFD" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12EarningsPerShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12EarningsPerShareDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note12EarningsPerShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13RestrictedStockRollforwardDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13ShareBasedCompensationArrangementsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_70D476DA14D30EBB4CB8E8010131B558" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable" xlink:label="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_B7AE266DDE5DD84F7478E801012E119D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_70D476DA14D30EBB4CB8E8010131B558" xlink:to="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_B7AE266DDE5DD84F7478E801012E119D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_32C79E2A1E557E82AE9DE801012EAAF0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_B7AE266DDE5DD84F7478E801012E119D" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_32C79E2A1E557E82AE9DE801012EAAF0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_32C79E2A1E557E82AE9DE801012EAAF0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_32C79E2A1E557E82AE9DE801012EAAF0" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_3C8589AF562169B4216CE801012F1526" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE" xlink:to="loc_us-gaap_CostOfSalesMember_3C8589AF562169B4216CE801012F1526" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_4C17960D2C94A936BB60E801012F940B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_4C17960D2C94A936BB60E801012F940B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_8BB0CA5EB0004947379FE80101300CDD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_7A4B2827AAD75DCB9217E801012FACFE" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_8BB0CA5EB0004947379FE80101300CDD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_1B1A99346335137A987CE8010130DD86" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_B7AE266DDE5DD84F7478E801012E119D" xlink:to="loc_us-gaap_AwardTypeAxis_1B1A99346335137A987CE8010130DD86" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_1B1A99346335137A987CE8010130DD86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_1B1A99346335137A987CE8010130DD86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_9EB02B16FBED399A8526E80101308E61" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83" xlink:to="loc_us-gaap_EmployeeStockOptionMember_9EB02B16FBED399A8526E80101308E61" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_153793D9CDF1E2DCE0BFE8010131EF71" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6BF82F2DAE05E6834A5AE80101302A83" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_153793D9CDF1E2DCE0BFE8010131EF71" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllocatedShareBasedCompensationExpense" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_915DEA9E5EDBA011A897E8010131AFFB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_70D476DA14D30EBB4CB8E8010131B558" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_915DEA9E5EDBA011A897E8010131AFFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_50AC5865D858AC7257ACE801013119AC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_70D476DA14D30EBB4CB8E8010131B558" xlink:to="loc_us-gaap_ShareBasedCompensation_50AC5865D858AC7257ACE801013119AC" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_12247B217E71CF041D9D6A96A5B1D7FA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_56D48380A8874257FDAD6A96A5B1EB3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_12247B217E71CF041D9D6A96A5B1D7FA" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_56D48380A8874257FDAD6A96A5B1EB3D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_F0572CBF2B89D40287D66A96A5B1CBCB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_56D48380A8874257FDAD6A96A5B1EB3D" xlink:to="loc_us-gaap_PlanNameAxis_F0572CBF2B89D40287D66A96A5B1CBCB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_16EE36F8FE6C5251631E6A96A5B18667_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_F0572CBF2B89D40287D66A96A5B1CBCB" xlink:to="loc_us-gaap_PlanNameDomain_16EE36F8FE6C5251631E6A96A5B18667_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_16EE36F8FE6C5251631E6A96A5B18667" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_F0572CBF2B89D40287D66A96A5B1CBCB" xlink:to="loc_us-gaap_PlanNameDomain_16EE36F8FE6C5251631E6A96A5B18667" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_A2019StockPlanMember" xlink:label="loc_sanm_A2019StockPlanMember_E133431799C0C58AC3F66A96A5B1F522" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_16EE36F8FE6C5251631E6A96A5B18667" xlink:to="loc_sanm_A2019StockPlanMember_E133431799C0C58AC3F66A96A5B1F522" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockCapitalSharesReservedForFutureIssuance" xlink:label="loc_us-gaap_CommonStockCapitalSharesReservedForFutureIssuance_1474771C86BCBD6BA6E36A96A5B17F4C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_12247B217E71CF041D9D6A96A5B1D7FA" xlink:to="loc_us-gaap_CommonStockCapitalSharesReservedForFutureIssuance_1474771C86BCBD6BA6E36A96A5B17F4C" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_StockOptionsAndUnvestedRestrictedStockUnitsOutstanding" xlink:label="loc_sanm_StockOptionsAndUnvestedRestrictedStockUnitsOutstanding_997284631DFF172FAAD66A96A5B112BD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_12247B217E71CF041D9D6A96A5B1D7FA" xlink:to="loc_sanm_StockOptionsAndUnvestedRestrictedStockUnitsOutstanding_997284631DFF172FAAD66A96A5B112BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_5DF38AD9D6330292F2266A96A5B17CB0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_12247B217E71CF041D9D6A96A5B1D7FA" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_5DF38AD9D6330292F2266A96A5B17CB0" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13StockBasedCompensation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13StockBasedCompensationTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note13UnrecognizedStockBasedCompensationExpenseDetails" xlink:type="extended">
    <link:loc xlink:href="sanm-20190330.xsd#sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems" xlink:label="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_4AD61DEFB587DDDE4E56DB1BA952CD90" xlink:type="locator" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_UnrecognizedStockBasedCompensationExpenseTable" xlink:label="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_B675631A9512CE29321ADB1BA95045D7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_4AD61DEFB587DDDE4E56DB1BA952CD90" xlink:to="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_B675631A9512CE29321ADB1BA95045D7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_C7E19CBB47C2475B250FDB1BA951CC54" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_sanm_UnrecognizedStockBasedCompensationExpenseTable_B675631A9512CE29321ADB1BA95045D7" xlink:to="loc_us-gaap_AwardTypeAxis_C7E19CBB47C2475B250FDB1BA951CC54" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_C7E19CBB47C2475B250FDB1BA951CC54" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_C7E19CBB47C2475B250FDB1BA951CC54" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_F0B6C935D7988A92BCD1DB1BA95224D9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_F0B6C935D7988A92BCD1DB1BA95224D9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PerformanceSharesMember" xlink:label="loc_us-gaap_PerformanceSharesMember_2D0B0ABDC5133CA9AF93DB1BA952AD0F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_6E78EB37C161F9CF4B8ADB1BA9519A74" xlink:to="loc_us-gaap_PerformanceSharesMember_2D0B0ABDC5133CA9AF93DB1BA952AD0F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_AE53F483853DD72C8D1ADB1BA9529215" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_4AD61DEFB587DDDE4E56DB1BA952CD90" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_AE53F483853DD72C8D1ADB1BA9529215" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_8834DC228817EF9A4B5CDB1BA9535C69" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_UnrecognizedCompensationCostAndWeightedAveragePeriodLineItems_4AD61DEFB587DDDE4E56DB1BA952CD90" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_8834DC228817EF9A4B5CDB1BA9535C69" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note1BasisOfPresentation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note1RevenueBeginningBalanceAdjustmentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems" xlink:label="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_75B2EF5001BD907E792EE80100D5495E" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable" xlink:label="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_002614947EBB07B5BBE8E80100D53CFD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_75B2EF5001BD907E792EE80100D5495E" xlink:to="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_002614947EBB07B5BBE8E80100D53CFD" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdjustmentsForNewAccountingPronouncementsAxis" xlink:label="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_961DF0826FE4D5265DDCE80100D5BCE7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_002614947EBB07B5BBE8E80100D53CFD" xlink:to="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_961DF0826FE4D5265DDCE80100D5BCE7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_9ECE5D796AE7CF120BE3E80100D5891B_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_961DF0826FE4D5265DDCE80100D5BCE7" xlink:to="loc_us-gaap_TypeOfAdoptionMember_9ECE5D796AE7CF120BE3E80100D5891B_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfAdoptionMember" xlink:label="loc_us-gaap_TypeOfAdoptionMember_9ECE5D796AE7CF120BE3E80100D5891B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_961DF0826FE4D5265DDCE80100D5BCE7" xlink:to="loc_us-gaap_TypeOfAdoptionMember_9ECE5D796AE7CF120BE3E80100D5891B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountingStandardsUpdate201409Member" xlink:label="loc_us-gaap_AccountingStandardsUpdate201409Member_FF928DF9723CD0268C2DE80100D559D6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember_9ECE5D796AE7CF120BE3E80100D5891B" xlink:to="loc_us-gaap_AccountingStandardsUpdate201409Member_FF928DF9723CD0268C2DE80100D559D6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_A97470F8A462281631C0E80100D5EDAE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionTable_002614947EBB07B5BBE8E80100D53CFD" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_A97470F8A462281631C0E80100D5EDAE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_46617EC763698925CABEE80100D599FF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_A97470F8A462281631C0E80100D5EDAE" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_46617EC763698925CABEE80100D599FF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain" xlink:label="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_46617EC763698925CABEE80100D599FF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionAxis_A97470F8A462281631C0E80100D5EDAE" xlink:to="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_46617EC763698925CABEE80100D599FF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member" xlink:label="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_9D397F0E90A4FEF12111E80100D589B4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InitialApplicationPeriodCumulativeEffectTransitionDomain_46617EC763698925CABEE80100D599FF" xlink:to="loc_us-gaap_DifferenceBetweenRevenueGuidanceInEffectBeforeAndAfterTopic606Member_9D397F0E90A4FEF12111E80100D589B4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1" xlink:label="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1_687420648555FCF95F47E80100D5A235" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_75B2EF5001BD907E792EE80100D5495E" xlink:to="loc_us-gaap_NewAccountingPronouncementOrChangeInAccountingPrincipleCumulativeEffectOfChangeOnEquityOrNetAssets1_687420648555FCF95F47E80100D5A235" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent" xlink:label="loc_us-gaap_ContractWithCustomerAssetNetCurrent_2834A4A813467207827AE80100D58B84" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_75B2EF5001BD907E792EE80100D5495E" xlink:to="loc_us-gaap_ContractWithCustomerAssetNetCurrent_2834A4A813467207827AE80100D58B84" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryNet" xlink:label="loc_us-gaap_InventoryNet_ABFD1658F66E832E8963E80100D5D79D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenueInitialApplicationPeriodCumulativeEffectTransitionLineItems_75B2EF5001BD907E792EE80100D5495E" xlink:to="loc_us-gaap_InventoryNet_ABFD1658F66E832E8963E80100D5D79D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2Inventories" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2InventoriesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note2InventoriesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_755808C4821662BD6DAA7967806CED93" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DisaggregationOfRevenueTable" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_755808C4821662BD6DAA7967806CED93" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_AA6007CC1A9FD40A563B79678068BEB1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_AA6007CC1A9FD40A563B79678068BEB1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_AA6007CC1A9FD40A563B79678068BEB1" xlink:to="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_AA6007CC1A9FD40A563B79678068BEB1" xlink:to="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IMSThirdPartyRevenueMember" xlink:label="loc_sanm_IMSThirdPartyRevenueMember_F7C6CC3207BE2A023C5379678069E834" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24" xlink:to="loc_sanm_IMSThirdPartyRevenueMember_F7C6CC3207BE2A023C5379678069E834" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CPSThirdPartyRevenueMember" xlink:label="loc_sanm_CPSThirdPartyRevenueMember_55F5EF9F8E384B3EB1E579678069E629" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_EFB0DFECD4EC1E0FBB3579678068ED24" xlink:to="loc_sanm_CPSThirdPartyRevenueMember_55F5EF9F8E384B3EB1E579678069E629" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_EndMarketAxis" xlink:label="loc_sanm_EndMarketAxis_0EBFA7D6EC26C6C31E327967806967DB" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:to="loc_sanm_EndMarketAxis_0EBFA7D6EC26C6C31E327967806967DB" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_EndMarketDomain" xlink:label="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_EndMarketAxis_0EBFA7D6EC26C6C31E327967806967DB" xlink:to="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_EndMarketDomain" xlink:label="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_EndMarketAxis_0EBFA7D6EC26C6C31E327967806967DB" xlink:to="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CommunicationsNetworksMember" xlink:label="loc_sanm_CommunicationsNetworksMember_CED76C63BFD605925C747967806AA7DC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC" xlink:to="loc_sanm_CommunicationsNetworksMember_CED76C63BFD605925C747967806AA7DC" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IndustrialMedicalAutomotiveandDefenseMember" xlink:label="loc_sanm_IndustrialMedicalAutomotiveandDefenseMember_8BF75AD90E054832CF407967806AE0A2" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC" xlink:to="loc_sanm_IndustrialMedicalAutomotiveandDefenseMember_8BF75AD90E054832CF407967806AE0A2" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CloudSolutionsMember" xlink:label="loc_sanm_CloudSolutionsMember_25EF69A06EF626D40D287967806AECFD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_EndMarketDomain_FCEE893C696F8A13AB5B796780696EDC" xlink:to="loc_sanm_CloudSolutionsMember_25EF69A06EF626D40D287967806AECFD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_StatementGeographicalAxis" xlink:label="loc_srt_StatementGeographicalAxis_51B80A4EF0B39E053C657967806A6726" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:to="loc_srt_StatementGeographicalAxis_51B80A4EF0B39E053C657967806A6726" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_51B80A4EF0B39E053C657967806A6726" xlink:to="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2018/elts/srt-2018-01-31.xsd#srt_SegmentGeographicalDomain" xlink:label="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_51B80A4EF0B39E053C657967806A6726" xlink:to="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_US" xlink:label="loc_country_US_1A2E668D61CE9A33BDF77967806B6A6F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:to="loc_country_US_1A2E668D61CE9A33BDF77967806B6A6F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MX" xlink:label="loc_country_MX_31E7C8CAC4CC265DFB957967806BAB37" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:to="loc_country_MX_31E7C8CAC4CC265DFB957967806BAB37" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_CN" xlink:label="loc_country_CN_6112D6D5B954F8A525C27967806B877C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:to="loc_country_CN_6112D6D5B954F8A525C27967806B877C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/country/2017/country-2017-01-31.xsd#country_MY" xlink:label="loc_country_MY_E1F37543ADE342B777B97967806BCA12" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:to="loc_country_MY_E1F37543ADE342B777B97967806BCA12" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_OtherInternationalMember" xlink:label="loc_sanm_OtherInternationalMember_82DCE9E30D9CD53AD67E7967806B47D8" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_8C8F07AA76F910F38B6D7967806A609A" xlink:to="loc_sanm_OtherInternationalMember_82DCE9E30D9CD53AD67E7967806B47D8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceAxis" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_3B4133CD139B3239BDB17967806BBA66" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_43B097DE426F148B140B796780686A66" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_3B4133CD139B3239BDB17967806BBA66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_3B4133CD139B3239BDB17967806BBA66" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_3B4133CD139B3239BDB17967806BBA66" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransferredAtPointInTimeMember" xlink:label="loc_us-gaap_TransferredAtPointInTimeMember_6753E53098E04FB2FE8B7967806CA98C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5" xlink:to="loc_us-gaap_TransferredAtPointInTimeMember_6753E53098E04FB2FE8B7967806CA98C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransferredOverTimeMember" xlink:label="loc_us-gaap_TransferredOverTimeMember_36ADC7E9DCB42B01E0507967806C82EA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_32C9DDE4BF6EF14ED9377967806C4BD5" xlink:to="loc_us-gaap_TransferredOverTimeMember_36ADC7E9DCB42B01E0507967806C82EA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_A1851FECBD9D8380075F7967806D0012" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_755808C4821662BD6DAA7967806CED93" xlink:to="loc_us-gaap_Revenues_A1851FECBD9D8380075F7967806D0012" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognition" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note3RevenueRecognitionTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4DerivativesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeLineItems" xlink:label="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeTable" xlink:label="loc_us-gaap_DerivativeTable_A7B3572B93FF457E0F12E801014E4D64" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_DerivativeTable_A7B3572B93FF457E0F12E801014E4D64" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:label="loc_us-gaap_HedgingDesignationAxis_7F9F229FEA691D81A911E801014E27DD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_A7B3572B93FF457E0F12E801014E4D64" xlink:to="loc_us-gaap_HedgingDesignationAxis_7F9F229FEA691D81A911E801014E27DD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_7F9F229FEA691D81A911E801014E27DD" xlink:to="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:label="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_7F9F229FEA691D81A911E801014E27DD" xlink:to="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_5CC7A8ACF538DCC0805FE801014E43E6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_5CC7A8ACF538DCC0805FE801014E43E6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NondesignatedMember" xlink:label="loc_us-gaap_NondesignatedMember_462BD9AF03638A133862E801014EAEF1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_E0197AD22376816FDE4AE801014E4EC9" xlink:to="loc_us-gaap_NondesignatedMember_462BD9AF03638A133862E801014EAEF1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_FD2F3569E2F7B7B28D2FE801014E9C01" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_A7B3572B93FF457E0F12E801014E4D64" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_FD2F3569E2F7B7B28D2FE801014E9C01" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_FD2F3569E2F7B7B28D2FE801014E9C01" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_FD2F3569E2F7B7B28D2FE801014E9C01" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ForeignExchangeForwardMember" xlink:label="loc_us-gaap_ForeignExchangeForwardMember_ED071818165627D5C131E801014EFA66" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB" xlink:to="loc_us-gaap_ForeignExchangeForwardMember_ED071818165627D5C131E801014EFA66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestRateSwapMember" xlink:label="loc_us-gaap_InterestRateSwapMember_ED47961F2BF3FA5CA002E801014EAC79" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_99119DA193A36A734B67E801014EFFBB" xlink:to="loc_us-gaap_InterestRateSwapMember_ED47961F2BF3FA5CA002E801014EAC79" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.sec.gov/invest/2013/invest-2013-01-31.xsd#invest_DerivativeNotionalAmount" xlink:label="loc_invest_DerivativeNotionalAmount_06590E0A5FEDDCF81FA4E801014E3C17" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_invest_DerivativeNotionalAmount_06590E0A5FEDDCF81FA4E801014E3C17" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NumberOfForeignCurrencyDerivativesHeld" xlink:label="loc_us-gaap_NumberOfForeignCurrencyDerivativesHeld_B2407FAB3669AB0574FFE801014EE0A5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_NumberOfForeignCurrencyDerivativesHeld_B2407FAB3669AB0574FFE801014EE0A5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1" xlink:label="loc_us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1_4DCE19548D6958312E76E801014E300C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_MaximumRemainingMaturityOfForeignCurrencyDerivatives1_4DCE19548D6958312E76E801014E300C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge" xlink:label="loc_us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge_7A346D3F9E2C54F8257DE801014EC58F" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_MaximumLengthOfTimeForeignCurrencyCashFlowHedge_7A346D3F9E2C54F8257DE801014EC58F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DerivativeMaturityDates" xlink:label="loc_us-gaap_DerivativeMaturityDates_60061210331AD2E1C4DFE801014ED9BC" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_DerivativeMaturityDates_60061210331AD2E1C4DFE801014ED9BC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd" xlink:label="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_6C5BC5F4978F1459703AE801014E92CD" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_FE974850688E573897F2E801014E48CA" xlink:to="loc_us-gaap_LineOfCreditFacilityInterestRateAtPeriodEnd_6C5BC5F4978F1459703AE801014E92CD" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4FairValueDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note4FinancialInstruments" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5Debt" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5DebtScheduleDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_6FD95257D448F61581F24BF2B7719E72" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_DebtInstrumentTable_6FD95257D448F61581F24BF2B7719E72" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_EE698BC696A8B50271664BF2B7714632" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_6FD95257D448F61581F24BF2B7719E72" xlink:to="loc_us-gaap_DebtInstrumentAxis_EE698BC696A8B50271664BF2B7714632" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_2097B170D6BD78DCFD774BF2B7716C55_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_EE698BC696A8B50271664BF2B7714632" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_2097B170D6BD78DCFD774BF2B7716C55_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_2097B170D6BD78DCFD774BF2B7716C55" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_EE698BC696A8B50271664BF2B7714632" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_2097B170D6BD78DCFD774BF2B7716C55" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_SecuredNotesdue2019Member" xlink:label="loc_sanm_SecuredNotesdue2019Member_51ED8C823BF144035EC54BF2B771322C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_2097B170D6BD78DCFD774BF2B7716C55" xlink:to="loc_sanm_SecuredNotesdue2019Member_51ED8C823BF144035EC54BF2B771322C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SecuredDebt" xlink:label="loc_us-gaap_SecuredDebt_48543BF22B70B40B5CF74BF2B77165DF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_SecuredDebt_48543BF22B70B40B5CF74BF2B77165DF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNotesPayable" xlink:label="loc_us-gaap_OtherNotesPayable_019C67ECAAFB04B08FF04BF2B7719949" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_OtherNotesPayable_019C67ECAAFB04B08FF04BF2B7719949" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_EFBBAB99B15319F6FA3B4BF2B7713CE3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_LongTermDebt_EFBBAB99B15319F6FA3B4BF2B7713CE3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNotesPayableCurrent" xlink:label="loc_us-gaap_OtherNotesPayableCurrent_8B05A0B459C22878DCAC4BF2B7719D72" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_OtherNotesPayableCurrent_8B05A0B459C22878DCAC4BF2B7719D72" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SecuredDebtCurrent" xlink:label="loc_us-gaap_SecuredDebtCurrent_29E434D7E24C730BDE3F4BF2B771E214" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_SecuredDebtCurrent_29E434D7E24C730BDE3F4BF2B771E214" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_EE7F37469667D418BB7F4BF2B7714D72" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_25DFD0914411E9C1B07F4BF2B7715ECE" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_EE7F37469667D418BB7F4BF2B7714D72" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5DebtTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_11F2B62A78F1DDF30B9D69FF8462B75D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_11F2B62A78F1DDF30B9D69FF8462B75D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CashFlowRevolverAxis" xlink:label="loc_sanm_CashFlowRevolverAxis_565E0F16578C241701AE69FF846218DB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_11F2B62A78F1DDF30B9D69FF8462B75D" xlink:to="loc_sanm_CashFlowRevolverAxis_565E0F16578C241701AE69FF846218DB" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CashFlowRevolverDomain" xlink:label="loc_sanm_CashFlowRevolverDomain_A39A8E87979D31F8626869FF8462303F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_CashFlowRevolverAxis_565E0F16578C241701AE69FF846218DB" xlink:to="loc_sanm_CashFlowRevolverDomain_A39A8E87979D31F8626869FF8462303F_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_CashFlowRevolverDomain" xlink:label="loc_sanm_CashFlowRevolverDomain_A39A8E87979D31F8626869FF8462303F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_CashFlowRevolverAxis_565E0F16578C241701AE69FF846218DB" xlink:to="loc_sanm_CashFlowRevolverDomain_A39A8E87979D31F8626869FF8462303F" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_DelayedDrawTermLoanMember" xlink:label="loc_sanm_DelayedDrawTermLoanMember_854548D2C4523CC0750F69FF84623A58" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_CashFlowRevolverDomain_A39A8E87979D31F8626869FF8462303F" xlink:to="loc_sanm_DelayedDrawTermLoanMember_854548D2C4523CC0750F69FF84623A58" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_2B0470AE84030DBEC81A69FF84622812" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_11F2B62A78F1DDF30B9D69FF8462B75D" xlink:to="loc_us-gaap_CreditFacilityAxis_2B0470AE84030DBEC81A69FF84622812" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_2B0470AE84030DBEC81A69FF84622812" xlink:to="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_2B0470AE84030DBEC81A69FF84622812" xlink:to="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_AmendedCashFlowRevolverMember" xlink:label="loc_sanm_AmendedCashFlowRevolverMember_F9C3DA97A4E1623495E469FF84628D71" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F" xlink:to="loc_sanm_AmendedCashFlowRevolverMember_F9C3DA97A4E1623495E469FF84628D71" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ForeignLineOfCreditMember" xlink:label="loc_us-gaap_ForeignLineOfCreditMember_E5D8285892703D44ED1069FF8462CC84" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_E5D8285892703D44ED1069FF8462CC84" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_Amendment1toAmendedCashFlowRevolverMember" xlink:label="loc_sanm_Amendment1toAmendedCashFlowRevolverMember_19F4E5FE2B14580A61F869FF84624323" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_81B686246DEEA68BC6DA69FF84620A6F" xlink:to="loc_sanm_Amendment1toAmendedCashFlowRevolverMember_19F4E5FE2B14580A61F869FF84624323" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventTypeAxis" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_D7DED2832C3FDC7C542E69FF846223F3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_11F2B62A78F1DDF30B9D69FF8462B75D" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_D7DED2832C3FDC7C542E69FF846223F3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_83BD8A7E76CBE106E96A69FF84629723_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_D7DED2832C3FDC7C542E69FF846223F3" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_83BD8A7E76CBE106E96A69FF84629723_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventTypeDomain" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_83BD8A7E76CBE106E96A69FF84629723" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_D7DED2832C3FDC7C542E69FF846223F3" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_83BD8A7E76CBE106E96A69FF84629723" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SubsequentEventMember" xlink:label="loc_us-gaap_SubsequentEventMember_EA3D41B559558301A9FA69FF8462749C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_83BD8A7E76CBE106E96A69FF84629723" xlink:to="loc_us-gaap_SubsequentEventMember_EA3D41B559558301A9FA69FF8462749C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_722C898320EA64BFC35769FF84629E5A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_722C898320EA64BFC35769FF84629E5A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCredit" xlink:label="loc_us-gaap_LineOfCredit_96A6D6230E070A39490069FF8462B72C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_us-gaap_LineOfCredit_96A6D6230E070A39490069FF8462B72C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LettersOfCreditOutstandingAmount" xlink:label="loc_us-gaap_LettersOfCreditOutstandingAmount_D9C469A142F77DC085F469FF8462DFDC" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_us-gaap_LettersOfCreditOutstandingAmount_D9C469A142F77DC085F469FF8462DFDC" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_AdditionalCreditLine" xlink:label="loc_sanm_AdditionalCreditLine_386EA292795B30B13A4D69FF8462C433" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_sanm_AdditionalCreditLine_386EA292795B30B13A4D69FF8462C433" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_DelayedDrawTermLoan" xlink:label="loc_sanm_DelayedDrawTermLoan_429FB78A0B883F535D6369FF8462C2DF" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_sanm_DelayedDrawTermLoan_429FB78A0B883F535D6369FF8462C2DF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LineOfCreditFacilityExpirationDate1" xlink:label="loc_us-gaap_LineOfCreditFacilityExpirationDate1_D9D99C55CBF31D245ABB69FF846227FD" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_A3F44BA3DB0F068F066F69FF8462C7C1" xlink:to="loc_us-gaap_LineOfCreditFacilityExpirationDate1_D9D99C55CBF31D245ABB69FF846227FD" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6AccountsReceivableSaleProgram" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note6AccountsReceivableSaleProgramDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_E3A07EFD78F59CC2F8D274AE38F7F3A0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_E3A07EFD78F59CC2F8D274AE38F7F3A0" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_SaleofAccountsReceivableAxis" xlink:label="loc_sanm_SaleofAccountsReceivableAxis_B5215F5E002CE46A3FCE74AE38F78696" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_E3A07EFD78F59CC2F8D274AE38F7F3A0" xlink:to="loc_sanm_SaleofAccountsReceivableAxis_B5215F5E002CE46A3FCE74AE38F78696" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_SaleofAccountsReceivableDomain" xlink:label="loc_sanm_SaleofAccountsReceivableDomain_86E65079F5522E5B552674AE38F7D623_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_SaleofAccountsReceivableAxis_B5215F5E002CE46A3FCE74AE38F78696" xlink:to="loc_sanm_SaleofAccountsReceivableDomain_86E65079F5522E5B552674AE38F7D623_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_SaleofAccountsReceivableDomain" xlink:label="loc_sanm_SaleofAccountsReceivableDomain_86E65079F5522E5B552674AE38F7D623" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_SaleofAccountsReceivableAxis_B5215F5E002CE46A3FCE74AE38F78696" xlink:to="loc_sanm_SaleofAccountsReceivableDomain_86E65079F5522E5B552674AE38F7D623" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_RPAMember" xlink:label="loc_sanm_RPAMember_424ED9F233B1A0DC3A7174AE38F8621C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_SaleofAccountsReceivableDomain_86E65079F5522E5B552674AE38F7D623" xlink:to="loc_sanm_RPAMember_424ED9F233B1A0DC3A7174AE38F8621C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_79F4BAF98C34CF4DA57374AE38F8CE1E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesTable_E3A07EFD78F59CC2F8D274AE38F7F3A0" xlink:to="loc_us-gaap_CreditFacilityAxis_79F4BAF98C34CF4DA57374AE38F8CE1E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_6186236BFC7FFE9902AA74AE38F8637E_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_79F4BAF98C34CF4DA57374AE38F8CE1E" xlink:to="loc_us-gaap_CreditFacilityDomain_6186236BFC7FFE9902AA74AE38F8637E_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_6186236BFC7FFE9902AA74AE38F8637E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_79F4BAF98C34CF4DA57374AE38F8CE1E" xlink:to="loc_us-gaap_CreditFacilityDomain_6186236BFC7FFE9902AA74AE38F8637E" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_AmendedCashFlowRevolverMember" xlink:label="loc_sanm_AmendedCashFlowRevolverMember_C181D4C9049588CAEDA174AE38F85252" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_6186236BFC7FFE9902AA74AE38F8637E" xlink:to="loc_sanm_AmendedCashFlowRevolverMember_C181D4C9049588CAEDA174AE38F85252" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_MaximumAccountsReceivableSaleCapacity" xlink:label="loc_sanm_MaximumAccountsReceivableSaleCapacity_36BBF8DE1434E6908F1F74AE38F9BFC1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_sanm_MaximumAccountsReceivableSaleCapacity_36BBF8DE1434E6908F1F74AE38F9BFC1" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_FaceValueofReceivableSoldPercentage" xlink:label="loc_sanm_FaceValueofReceivableSoldPercentage_6A2D17F44485B908A0DE74AE38F9F983" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_sanm_FaceValueofReceivableSoldPercentage_6A2D17F44485B908A0DE74AE38F9F983" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_AccountsReceivableSoldDuringThePeriod" xlink:label="loc_sanm_AccountsReceivableSoldDuringThePeriod_8F14A3E25DAB6865488E74AE38F9D016" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_sanm_AccountsReceivableSoldDuringThePeriod_8F14A3E25DAB6865488E74AE38F9D016" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized" xlink:label="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized_D73D70381563DFF08B4974AE38F95A2A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesAmountDerecognized_D73D70381563DFF08B4974AE38F95A2A" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_AmountCollectedButNotRemittedtoFinancialInstitutions" xlink:label="loc_sanm_AmountCollectedButNotRemittedtoFinancialInstitutions_B70CEC88881ED636B00D74AE38FA711A" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_sanm_AmountCollectedButNotRemittedtoFinancialInstitutions_B70CEC88881ED636B00D74AE38FA711A" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_PercentageSoldandOutstandingAtAnyTime" xlink:label="loc_sanm_PercentageSoldandOutstandingAtAnyTime_15FBCC54E04EFD04A6BC74AE38FA0883" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransferOfFinancialAssetsAccountedForAsSalesLineItems_9782468E41925F8467C874AE38F949AD" xlink:to="loc_sanm_PercentageSoldandOutstandingAtAnyTime_15FBCC54E04EFD04A6BC74AE38FA0883" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note7CommitmentsAndContingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note7ContingenciesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note8Restructuring" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note8RestructuringAndRelatedActivitiesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note8RestructuringDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_A70635EAE7CCCE8D3E1246BA022E673D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_A70635EAE7CCCE8D3E1246BA022E673D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringPlanAxis" xlink:label="loc_us-gaap_RestructuringPlanAxis_8B8FB068D582D5A3129246BA022FD000" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_A70635EAE7CCCE8D3E1246BA022E673D" xlink:to="loc_us-gaap_RestructuringPlanAxis_8B8FB068D582D5A3129246BA022FD000" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_8B8FB068D582D5A3129246BA022FD000" xlink:to="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringPlanDomain" xlink:label="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_8B8FB068D582D5A3129246BA022FD000" xlink:to="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_Q1FY18PlanMember" xlink:label="loc_sanm_Q1FY18PlanMember_9AA394401A6A4D23FD6D46BA022FD721" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A" xlink:to="loc_sanm_Q1FY18PlanMember_9AA394401A6A4D23FD6D46BA022FD721" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_OtherplansMember" xlink:label="loc_sanm_OtherplansMember_8D17F3641C345F5492D346BA02304B40" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_F924C9D0B01CF0D3D32046BA022FB31A" xlink:to="loc_sanm_OtherplansMember_8D17F3641C345F5492D346BA02304B40" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_D21BF827E45220C39F0D46BA0230FAAA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_A70635EAE7CCCE8D3E1246BA022E673D" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_D21BF827E45220C39F0D46BA0230FAAA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D21BF827E45220C39F0D46BA0230FAAA" xlink:to="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D21BF827E45220C39F0D46BA0230FAAA" xlink:to="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IMSMember" xlink:label="loc_sanm_IMSMember_40CFE54FDB1950A2853F46BA0230E091" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D" xlink:to="loc_sanm_IMSMember_40CFE54FDB1950A2853F46BA0230E091" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AllOtherSegmentsMember" xlink:label="loc_us-gaap_AllOtherSegmentsMember_5D43F1F9F034450EF9EE46BA02312E85" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_670E8560976BF1E5385346BA0230FD3D" xlink:to="loc_us-gaap_AllOtherSegmentsMember_5D43F1F9F034450EF9EE46BA02312E85" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_ACB10C25AC491917562546BA0231DEBE" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_A70635EAE7CCCE8D3E1246BA022E673D" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_ACB10C25AC491917562546BA0231DEBE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_ACB10C25AC491917562546BA0231DEBE" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_ACB10C25AC491917562546BA0231DEBE" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="loc_us-gaap_EmployeeSeveranceMember_7629AFCF3750BBCBDB0746BA0231C5E9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC" xlink:to="loc_us-gaap_EmployeeSeveranceMember_7629AFCF3750BBCBDB0746BA0231C5E9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherRestructuringMember" xlink:label="loc_us-gaap_OtherRestructuringMember_968AB110CB1720E2153246BA02321D58" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_3D6F7B4E496D0C16446446BA02319DDC" xlink:to="loc_us-gaap_OtherRestructuringMember_968AB110CB1720E2153246BA02321D58" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_RestructuringExpenseRecoverypriortoreimbursement" xlink:label="loc_sanm_RestructuringExpenseRecoverypriortoreimbursement_EC06A74397D3E0BC58F646BA0232810A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_sanm_RestructuringExpenseRecoverypriortoreimbursement_EC06A74397D3E0BC58F646BA0232810A" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_Expected3rdPartyReimbursement" xlink:label="loc_sanm_Expected3rdPartyReimbursement_E4275BC27BC1AB22140C46BA0232D5EA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_sanm_Expected3rdPartyReimbursement_E4275BC27BC1AB22140C46BA0232D5EA" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_A3rdPartyReimbursement" xlink:label="loc_sanm_A3rdPartyReimbursement_18C563F2BE4CD126435646BA0233E8AB" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_sanm_A3rdPartyReimbursement_18C563F2BE4CD126435646BA0233E8AB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringAndRelatedActivitiesInitiationDate" xlink:label="loc_us-gaap_RestructuringAndRelatedActivitiesInitiationDate_8F04DDF2D8CDBE7881BA46BA02339E2E" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_RestructuringAndRelatedActivitiesInitiationDate_8F04DDF2D8CDBE7881BA46BA02339E2E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringAndRelatedActivitiesCompletionDate" xlink:label="loc_us-gaap_RestructuringAndRelatedActivitiesCompletionDate_CD9676C07DFC2B4D2C1046BA0233478F" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_RestructuringAndRelatedActivitiesCompletionDate_CD9676C07DFC2B4D2C1046BA0233478F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_FAC60EAA49B5422C3C9A46BA02338B68" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedNumberOfPositionsEliminated_FAC60EAA49B5422C3C9A46BA02338B68" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherReceivables" xlink:label="loc_us-gaap_OtherReceivables_59C351CADDCF65E986E146BA02336A64" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_OtherReceivables_59C351CADDCF65E986E146BA02336A64" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_F736E1437671E75D31E246BA023383DA" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_RestructuringCharges_F736E1437671E75D31E246BA023383DA" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_RestructuringExpenseRecoverynet" xlink:label="loc_sanm_RestructuringExpenseRecoverynet_AEFF1463B8F63927EE3E46BA0234A303" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_sanm_RestructuringExpenseRecoverynet_AEFF1463B8F63927EE3E46BA0234A303" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RestructuringReserve" xlink:label="loc_us-gaap_RestructuringReserve_18CC49B6828C9FFCD65546BA0234F012" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_669255877D289E8B283C46BA0232A1F8" xlink:to="loc_us-gaap_RestructuringReserve_18CC49B6828C9FFCD65546BA0234F012" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note9IncomeTax" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.sanmina.com/role/Note9IncomeTaxDetails" xlink:type="extended">
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IncomeTaxDisclosureTableLineItems" xlink:label="loc_sanm_IncomeTaxDisclosureTableLineItems_5A564950D99BFF7F24BCDAD00DF01959" xlink:type="locator" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IncomeTaxDisclosureTableTable" xlink:label="loc_sanm_IncomeTaxDisclosureTableTable_E4EF5623834FE1A22D5ADAD00DEEF4C6" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_sanm_IncomeTaxDisclosureTableLineItems_5A564950D99BFF7F24BCDAD00DF01959" xlink:to="loc_sanm_IncomeTaxDisclosureTableTable_E4EF5623834FE1A22D5ADAD00DEEF4C6" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IncomeTaxDisclosureAxis" xlink:label="loc_sanm_IncomeTaxDisclosureAxis_30C264F76048FF96E6DBDAD00DEFE85A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_sanm_IncomeTaxDisclosureTableTable_E4EF5623834FE1A22D5ADAD00DEEF4C6" xlink:to="loc_sanm_IncomeTaxDisclosureAxis_30C264F76048FF96E6DBDAD00DEFE85A" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IncomeTaxDisclosureDomain" xlink:label="loc_sanm_IncomeTaxDisclosureDomain_9C7AB2F8938A8A9ECB1EDAD00DEFA434_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_sanm_IncomeTaxDisclosureAxis_30C264F76048FF96E6DBDAD00DEFE85A" xlink:to="loc_sanm_IncomeTaxDisclosureDomain_9C7AB2F8938A8A9ECB1EDAD00DEFA434_default" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_IncomeTaxDisclosureDomain" xlink:label="loc_sanm_IncomeTaxDisclosureDomain_9C7AB2F8938A8A9ECB1EDAD00DEFA434" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_sanm_IncomeTaxDisclosureAxis_30C264F76048FF96E6DBDAD00DEFE85A" xlink:to="loc_sanm_IncomeTaxDisclosureDomain_9C7AB2F8938A8A9ECB1EDAD00DEFA434" xlink:type="arc" />
    <link:loc xlink:href="sanm-20190330.xsd#sanm_USTaxCutsandJobsActH.R.1Member" xlink:label="loc_sanm_USTaxCutsandJobsActH.R.1Member_D887953A265D48E45CD1DAD00DEFE51D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_IncomeTaxDisclosureDomain_9C7AB2F8938A8A9ECB1EDAD00DEFA434" xlink:to="loc_sanm_USTaxCutsandJobsActH.R.1Member_D887953A265D48E45CD1DAD00DEFE51D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_E00AA590F1B6FA11BB32DAD00DF033FD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_IncomeTaxDisclosureTableLineItems_5A564950D99BFF7F24BCDAD00DF01959" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_E00AA590F1B6FA11BB32DAD00DF033FD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_CAECBD14EBC6D3A24657DAD00DF04872" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_sanm_IncomeTaxDisclosureTableLineItems_5A564950D99BFF7F24BCDAD00DF01959" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_CAECBD14EBC6D3A24657DAD00DF04872" xlink:type="arc" />
  </link:definitionLink>
</link:linkbase>
