How do I write this cross Join in MySQL? It should create a set of columns (ControlRange, SensorBias, SensorError, VDCurve, INSHalfCurve, INSSensCurve, ExogDEXCurve, InitGlucose) and all permutations of their values. I want the order given to be the order of permutation (permute through all values of ControlRange before incrementing SensorBias). I get syntax errors when running this in MySQL, which worked fine in SQL Server.

USE IMTsimulations
;WITH Five(num) AS
(
  SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4
), Four(num) AS
(
  SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3
), Three(num) AS
(
  SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2
), Two(num) AS
(
  SELECT 5 UNION ALL SELECT 6
)
-- ##INSERT INTO [dbo].[Parameters]
     -- (ControlRange, InitGlucose, ExogDEXCurve, INSSensCurve, INSHalfCurve, VDCurve, SensorError, SensorBias)
     -- ##(ControlRange, SensorBias, SensorError, VDCurve, INSHalfCurve, INSSensCurve, ExogDEXCurve, InitGlucose)
     -- USE the SELECT to enforce incrementation order

SELECT cr.[num] AS [ControlRange],
       sb.[num] AS [SensorBias],
       se.[num] AS [SensorError],
       vd.[num] AS [VDCurve],
       i_t.[num] AS [INSHalfCurve],
       i_s.[num] AS [INSSensCurve],
       exdex.[num] AS [ExogDEXCurve],
       initg.[num] AS [InitGlucose]    
FROM Two cr
CROSS JOIN Three initg
CROSS JOIN Five exdex
CROSS JOIN Five i_s
CROSS JOIN Four i_t
CROSS JOIN Four vd
CROSS JOIN Three se
CROSS JOIN Five sb
ORDER BY ControlRange, SensorBias, SensorError, VDCurve, INSHalfCurve, INSSensCurve, ExogDEXCurve, InitGlucose
MySQL does not support WITH and does not use [] around identifiers (it uses backticks (`) instead). You will probably have to repeat the right SELECT ... UNION ... as a subquery for each join. Other than that Cross join is the default one if you do not specify any join conditions.

SELECT cr.num AS ControlRange,
       sb.num AS SensorBias,
       se.num AS SensorError,
       vd.num AS VDCurve,
       i_t.num AS INSHalfCurve,
       i_s.num AS INSSensCurve,
       exdex.num AS ExogDEXCurve,
       initg.num AS InitGlucose    
FROM (SELECT 0 as num UNION ALL SELECT 1) cr
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2) initg
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) exdex
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) i_s
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3) i_t
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3) vd
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2) se
CROSS JOIN (SELECT 0 as num UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) sb
ORDER BY ControlRange, SensorBias, SensorError, VDCurve, INSHalfCurve, INSSensCurve, ExogDEXCurve, InitGlucose


http://sqlfiddle.com/#!9/9eecb7d/27829 (hope I did not do any mistake when rewriting it)

You could instead create tables Two, Three, Four and Five if you use it often, but there is soe overhead in actually storing it.