08.11.2016, 08:26
Try this, it should tell you what's going on. Most probably your user cannot access the database remotely (privileges).
Code:
dbcon, err = env:connect('base_test', 'root','pass', '192.168.1.40')
log(dbcon, err)