by Saha Abu Bakar.
This is the code:
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost'; should I change it to mydomain?
$CFG->dbname = 'moodle';
$CFG->wwwroot = 'http://mydomain/X_Server';
$CFG->dataroot = 'C:\\X_Server\\htdocs\\moodledata'; should I change this to 'http://mydomain/X_Server/htdocs/moodledata'?
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777; is this ok?