Jump to content

Remote Mysql Connection


Zaventh

Recommended Posts

I am having much trouble connecting to my MySQL database from within dreamweaver on one of my two domains. I have read many articles including:

 

http://totalchoicehosting.com/help/textpagea9.htm

 

And some others, and I have checked and rechecked ten times at least. I have tried creating new accounts for the FTP access and also on the mySQL server. I have tried with different databases even but when I try to connect it says Access Denied. Sometimes it says Unspecific Error. But when I use any other MySQL admin tools such as MySQL-Front, it works fine--but this doesn't help me as I want to edit PHP pages using the SQL backend. I have allowed ALL access to the database remotely.

 

I know I am doing it right, though, because on my other domain (also hosted by TCH), it works fine as I would expect. I enter all the FTP info for the testing server and setup the database connection FINE. But not so on Server 63. I have created new Sites within dreamweaver and set them to the same server and nothing.

 

What could I possibly be missing? :clapping:

Link to comment
Share on other sites

Welcome to the forums, Zaventh! :clapping:

 

In your CPanel, in MySQL Databases, I'd suggest checking to see that you've added your MySQL user to the MySQL database (it's a common step that users often forget to do).

 

Again in CPanel / MySQL Databases, Access Hosts (near the bottom of the page), I would not recommend allowing access from anywhere (wildcard of '%'). I usually recommend only allowing access from your PC's IP address - it's more secure.

 

In DreamWeaver, you should use the following settings (just going by the TCH Help page you linked to):

MySQL Server: your-TCH-domain.com

User Name: cpanelName_mysqlUserName

Password: your-mysql-db-password

Database: cpanelName_mysqlDatabaseName

 

('cpanelName' is the username you use to log into CPanel.)

 

Try those settings and see if they work any better for you. :D

Link to comment
Share on other sites

Welcome to the forums, Zaventh!  :clapping:

 

In your CPanel, in MySQL Databases, I'd suggest checking to see that you've added your MySQL user to the MySQL database (it's a common step that users often forget to do).

 

Again in CPanel / MySQL Databases, Access Hosts (near the bottom of the page), I would not recommend allowing access from anywhere (wildcard of '%').  I usually recommend only allowing access from your PC's IP address - it's more secure.

 

In DreamWeaver, you should use the following settings (just going by the TCH Help page you linked to):

MySQL Server: your-TCH-domain.com

User Name: cpanelName_mysqlUserName

Password: your-mysql-db-password

Database: cpanelName_mysqlDatabaseName

 

('cpanelName' is the username you use to log into CPanel.)

 

Try those settings and see if they work any better for you.  :)

 

 

Yes... I have the user added to the database. I added two actually just to eliminate any possibilities there. Both with the appropriate permissions on the database (ALL). I even created another database with the same users added with the same permissions--no luck there either. I then created yet another database with its own user and still Access Denied.

 

I used % just to elimate any possibility there as well. I can set it to my IP once I get it working...

 

I have all those account settings correct as well. I can FTP using the cpanel name and password from within dreamweaver fine. I used the format which you have there and I have checked it 100 times just to make sure I'm not crazy. Still get Access Denied.

 

On my other domain with TCH, I have followed the instructions and it worked fine! Database connects fine--I can enumerate all the tables and everything. On this server, though it doesn't. That's why I was thinking perhaps there is a TCH-side issue here... :D

Link to comment
Share on other sites

I have banged my head on this one a few time, but it is easy to fix.

In your Site Settings under Testing Server find 'URL prefix:' (should be last setting).

It probally looks like

http://ftp.totalchoicehosting.com/public_html

or

http://totalchoicehosting.com/public_html'>http://totalchoicehosting.com/public_html

Just change it to

http://totalchoicehosting.com/

now your DB should connect when in Live Data View.

Link to comment
Share on other sites

I have banged my head on this one a few time, but it is easy to fix.

In your Site Settings under Testing Server find 'URL prefix:' (should be last setting).

It probally looks like

http://ftp.totalchoicehosting.com/public_html

or

http://totalchoicehosting.com/public_html'>http://totalchoicehosting.com/public_html

Just change it to

http://totalchoicehosting.com/

now your DB should connect when in Live Data View.

 

I had the URL prefix to http://www.siteroot.com. I changed it to the root path where my index page is (http://www.siteroot.com/folder) and still nothing. I have played around with this option along with all the others... Every attempt gives me 'Access Denied'

Link to comment
Share on other sites

Also interesting find...

 

I imported the database in question to my local copy of MySQL (4.1), changed only the server address to localhost, and everything works fine...

 

I noticed my domain in question is running 4.0.22

 

My other domain (which works) is running 4.0.23

 

Just though I'd point these things out...

Link to comment
Share on other sites

Have you tried using MySQL Front to connect to your domain on server 63? If you have, and you can connect, that would seem to indicate a problem with the settings in DreamWeaver, not the MySQL server.

 

If you cannot connect, it could indicate a problem with the MySQL server, but it may be that you're still not using the correct settings to connect in MySQL Front or DreamWeaver.

 

The settings I indicated above are the correct ones to use.

 

I imported the database in question to my local copy of MySQL (4.1), changed only the server address to localhost, and everything works fine...
Unfortunately, that doesn't really prove anything. Since you have to add your CPanel username to the MySQL username and database name to connect to the TCH MySQL server, you should have also had to change the username and database settings in DreamWeaver when switching it to use the localhost MySQL server.

 

That's why I was thinking perhaps there is a TCH-side issue here...

The forum moderators do not have access to your CPanel or the TCH servers. If you really believe the problem is with the server, you'd need to submit a ticket to the Help Desk to get the issue resolved.

Link to comment
Share on other sites

That's what I thought too... MySQL-Front works fine. But I cannot figure out why Dreamweaver will not connect to it when it will connect to another MySQL server on TCH. I've copied the configuration that works on the other TCH server used that format to the letter. I've even setup a new site in DW and started from scratch and that doesn't work.

 

I did submit a ticket with TCH, and they told me to come here. :blink:

 

Later today I may install DW on a new machine just to see... but it is really driving me crazy. DW has its own SQL connect code page in PHP which it uploads and tries to execute I guess to connect to the DB. Could there be some problem in there?

Edited by Zaventh
Link to comment
Share on other sites

That's what I thought too... MySQL-Front works fine.

 

I did submit a ticket with TCH, and they told me to come here.  :blink:

Yeah...If MySQL Front works, the problem isn't with the server, and there isn't anything the Help Desk can really do.

 

DW has its own SQL connect code page in PHP which it uploads and tries to execute I guess to connect to the DB. Could there be some problem in there?

I guess that would depend on what DreamWeaver does with the page and what's actually in it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...