How-To

How do I connect to a MySQL database with a script using Plesk?

When installing a PHP script, it’s typical for the script to ask for the following Mysql information. Normally, it wants a new database, user, and password so that it can generate the tables for the DB.

Mysql Host : localhost
Mysql User :
Mysql Pass :
Mysql DB:

Typically the ‘Mysql Host’ should be set to ‘localhost’.

You will need to create the new Mysql user, pass, and database. Below are instructions on how to do this:

  1. Log into Plesk.
  2. Select Domains at the top right of the page.
  3. Select your domain by clicking on it.
  4. In the box labelled Applications & Services, click the Databases icon. If you do not see this icon click the down arrow next to Applications & Services and select Databases from there.
  5. Click Add New Database and type in your new database name. The Type section should be set to MYSQL and the Database Server section should be set to Local MySQL server. Click OK.
  6. On the following page, click Add New Database User and enter the username and password (twice) and click OK.

Please note: ServInt has discontinued support for the Plesk control panel.

Photo by Jim Winstead

Find out more about ServInt solutions

Starting at $25

  • Hosting Advice
  • The New York Times
  • The Hill
  • Bloomberg
  • The Seattle Times
  • Computer World
  • Ars Technica
  • MSNBC

To engage with the ServInt Sales Team use the following chat icon. Normal sales hours are Monday-Friday 9am-5pm EST but feel free to leave a message and we will follow up as soon as possible.

Sales Chat



To engage with the ServInt Support Team you must be logged into our Customer Portal for identity verification and have a ticket opened about your request or there will only be limited support offered.

Support Chat

CLOSE