DMXzone Server Connect Support Product Page

How to connect to database on remote server?

Asked 20 Mar 2017 15:46:08
1
has this question
20 Mar 2017 15:46:08 Bruce Wilkie posted:
I don't know if I'm doing this right or wrong. I'm trying to set up a connection to a database on my hosting provider's server. I can connect to a database fine if it's on my PC (I'm running XAMPP on my pc for developing and testing sites locally).

From what I understand, I need to set up the 'Remote' and 'Testing' server first within Dreamweaver so that it's connecting to my hosting provider's server rather than connecting to XAMPP on my PC. Then I set up a database connection using DMXZone Server Connect using 'localhost' as the server address, and enter in the database name, username and password for the database that's running on my hosting provider's server. I'm doing this, but then when I click 'OK' within the 'Conection Options' dialog for DMXZone Connection Server, it tests the connection before closing the window and comes up with an error message "Error using this Database Connection! Server Response : Not Permitted".

I don't know what this means. Is there a way I can save these connection settings and then upload the files via FTP so I can see if it works 'locally' once uploaded to the server?

Let me know if you need any more information from me regarding this.

thanks

Replies

Replied 21 Mar 2017 07:36:48
21 Mar 2017 07:36:48 Teodor Kuduschiev replied:
Hi Bruce,
You should setup your remote and testing server to point to your hosting in DW site definition. Then when you create the database connection use the details provided by your hosting provider, to connect to your database.
Replied 21 Mar 2017 11:16:39
21 Mar 2017 11:16:39 Bruce Wilkie replied:
Thanks Teodor. Wasn't working when trying before but I've tried again this morning and I'm making some progress now. However still not working properly so here's where I'm at so far:

Have created a MySQL database for testing, just with a single table and single record in that table.
Have set up a new site in Dreamweaver and connected to the server that has the database on it.
Have created a new Server Action using DMXZone Server Connect and added a Database Connection Step to that Server Action which successfully connected to my database on the remote server.

I'm now trying to add another Step to the same Server Action which will list the content of the table in this database (just 1 record as mentioned above).

However, when I try to add this second step using 'Add Database Query' I'm now getting a database connection error when I open up the Query Options dialoge and then click on the Plus sign to 'Add the Table for Usage'. When I try this, I get the error message:

"Error using this Database Connection!
Server Response: SQLSTATE[HY000][1045] Access denied for user 'brucewil_dmxuser'@'localhost' (using password: YES)"

And I can go no further. I just have to shut down the Query Options dialoge

I can still open up the previous Step (Database Connection) and test it using the 'Test Connection' in the Connection Settings dialoge box, and it successfully connects to the database still.

Any ideas what's wrong?
Replied 21 Mar 2017 13:21:11
21 Mar 2017 13:21:11 Teodor Kuduschiev replied:
Hi Bruce
It appears the user you are using: brucewil_dmxuser does not have permissions to access your db/table. Please double check your permissions.
Replied 21 Mar 2017 13:40:35
21 Mar 2017 13:40:35 Bruce Wilkie replied:
Thanks Teodor.

If that's the case then how come when I click on the 'Test Connection' in the Connections Settings dialog box for the same connection that I use for the Query, it successfully connects to the database?

I've successfully set up this connection three times just to test it, always using the same server address, database, user and password. But each time I then go on to try to set up a query using the connection, I get this same connection error.
Replied 21 Mar 2017 13:43:06
21 Mar 2017 13:43:06 Teodor Kuduschiev replied:
Probably you have the permissions to connect to the database but not to read the specific table's data? Please check this with your hosting provider ...
Replied 21 Mar 2017 13:50:00
21 Mar 2017 13:50:00 Bruce Wilkie replied:
Thanks Teodor. Whilst you were typing that I thought of something else as a possibility and looks like I've fixed it.

Seems that the password I set up for the user was causing a problem with the Query. I'm guessing an illegal character or one that was just conflicting with the script used to run the Query system in DMXZone Server Connect.

I changed the password of the database to one just using letters and numbers and updated the Connection Settings with the new password. Seems to have fixed it as I can now add tables and fields in the Query dialog.

For the record, the old database password I was using was:

-^F@$+iJ~7PP

(fine to publish here as now defunct).

Is there anything in that password that looks like it may have caused the issue? And am I best off leaving special characters out of database passwords in future?
Replied 21 Mar 2017 14:57:01
21 Mar 2017 14:57:01 Teodor Kuduschiev replied:
Hi Bruce,
I will check which of these chars are causing issues and will see if this can be improved in the next update.

Reply to this topic