Setting Up a Data Source in ColdFusion
NOTE: You may have to modify your /etc/hosts file in order for ColdFusion datasources to work with Plesk. This is because Plesk database user permissions apply only to localhost and your primary IP address. ColdFusion uses your primary full hostname to connect, and this must be linked to your primary IP address through your /etc/hosts file for a successful connection to occur.
If your file resembles the following:
127.0.0.1 [full_hostname] [short_hostname] localhost localhost.localdomain
it should be modified with your preferred text editor as shown below, substituting your server's values for those in brackets:
127.0.0.1 localhost localhost.localdomain
[your_primary_ip] [full_hostname] [short_hostname]
To Set Up a Data Source In ColdFusion
- Log in to the administrator page at http://[machinename]/CFIDE/administrator/index.cfm.
- From Data & Services, select Data Sources.
- In the Data Source Name box, specify a name, such as mysql_local.
- Select the driver type, MySQL, and then click Add.
- In the Database, Username, and Password fields, specify the information from the MySQL database you created earlier.
- To add a description, in the Description field, specify the description.
- Click Submit.
You can use the MySQL data source inside your ColdFusion applications. You may want to use a program such as Macromedia Dreamweaver to receive the full benefits of ColdFusion.