# 17.3. Connecting Your MySQL Database

The AI2SQL plugin allows you to connect directly to your Mssql database. Here's how to do it:

1. Visit AI2sql GPTs [application](https://chat.openai.com/g/g-hKdeP1Dou-ai2sql).
2. Navigate to the AI2SQL GPTs interface.
3. In the prompt field, type "Test Connection".
4. To connect to a data source, I'll need specific details about the database you're using. Please provide the following information:

   1. **Type of Database**: Are you using MySQL, PostgreSQL, Microsoft SQL Server, or another type of database?
   2. **Server Name**: The address of the server where your database is hosted.
   3. **Database Name**: The name of the specific database you want to connect to.
   4. **Username and Password**: Credentials for accessing the database.
   5. **Port** (if applicable): The port number used to connect to the database.
   6. **ai2sql\_token**: If you have an [ai2sql token](https://ai2sql.gitbook.io/ai2sql/17.-ai2sql-gpts/17.2.-obtaining-your-token), please provide it for a secure connection.

   <figure><img src="https://3005060795-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9oPPpXcfNXETmlVmVUd%2Fuploads%2F9t3dnFN1Smq1BEKx9sXq%2Fimage.png?alt=media&#x26;token=b895b44c-c36d-4080-8ad7-5f0b3d9b12be" alt=""><figcaption></figcaption></figure>
