Usually in cpanel you have to create the database and user prior to installing modx.
Go to the database/mysql section in cpanel, create a new database (write down its name), create a new mysql user (remember the username and password) and assign it privileges to the new database.
Now in the MODx install use ’localhost’ as the server and fill in the rest of the details according to what you did in the previous step.