[Please aware that you have to change settings for mining with official wallets]
1. delete the line with testnet, in magi.conf
2. set rpcport: rpcport=8232, in magi.conf
3. change the miner setting, sole mining should be like this: 127.0.0.1:8232
I am not sure of pool mining, so probably you have to sole mining at this time.
Well, actually...
delete only testnet=1 line.
other lines have nothing to do with network, just rpc communication with miner or rpc commands, like ./magid getinfo.
and change rpcuser and rpcpasswprd from default, or bad people will rob you :-D