Jump to content

Dreamweaver Mx, Php, Mysql


KevCraighead

Recommended Posts

I am in the process of trying to learn PHP & MySQL. So far I have figured out how to create a MySQL database using the excellent Total Hosting tutorials. However, I just can't get Dreamweaver to connect to the database and show the tables and I can't figure out why!

 

I have created a database called "user", which has been renamed "competi_user" as I created it through cpanel. I also created a user which is able to access the database called "competi" which was also renamed "competi_competi" as before. I then created a table called user and populated it with a couple of records.

 

I then went to Dreamweaver and setup a site with a testing server. I don't have PHP or MySQL locally so I decided to use the webserver as the testing server.

 

Server model: PHPMySQL

Access: FTP

FTP host: Mywebsite.com

Login: MyLogin

Password: MyPassword

 

Testing this showed that the ftp link works. So far, so good. (Also setup local and remote stuff too.)

 

I then go to the Application - Databases panel to try and create a connection from Dreamweaver to my testing server.

 

Connection: MySQL Connection

Connection name: dbUserConnection

My SQL Server: localhost

Username: competi_competi

Password: the password

Database: competi_user

 

When I click test I get "Unknown error". Very helpful. I have tried changing the SQL server name to the webserver name but this makes no difference.

 

Anyone have any ideas what I am doing wrong? I am going mad trying to work it!!! Any help, tips, prompts and hand holding would be appreciated!

Link to comment
Share on other sites

Hi...

 

I worked through a similar problem a while back...it took me about 2 weeks!!

 

One quick suggestion...in your Testing Server information...in the bottom box where you list the URL prefix, make sure /public_html does NOT follow your website address. Also, in your connection...try using 66.11.163.212 instead of localhost. I'm not sure if that IP is specific to my server...or if it's a general TCH IP.

 

Let me know if any of that works, and if not, I'll look into it a little further.

 

Tracy

Link to comment
Share on other sites

I too cannot get DW to connect. I can connect to the db using MySql-Front and I can upload thru the remote and testing serviers in DW but connecting to mysql thru DW I get a 1045 error. I am probably just going to switch hosts because support claims everything is configured properly on their end. Right now I have my db sitting on another server, at another host, and I am able to run my TCH site using that database. So if I can configure the db on a completely different server, why not on TCH servers?

 

Part of the problem is the DW mysql/php setup sucks. The DW ftp sucks. But since it runs on another server logic tells me it is a TCH problem.

 

Anyone have any suggestions before I shop for another host? Too bad because for the price I think these guys are a good hosting company.

Link to comment
Share on other sites

Rocket-Rob...

 

A while back I was in your shoes! I too thought the problem was with TCH. I was wrong. Give us a chance in the forum to figure out your problem.

 

You are correct about DW configurations for database connections and ftp...they do suck. The problem is trying to figure out what info will allow DW to talk to the particular host you use. The information is likely to change with a different host. Thus, the info you would use with the current host where your database sits will likely be quite different from the info you need to make it work with TCH.

 

If you would like some specific help, email or PM me and I will give it my best shot. I got my connections to work...we should be able to get yours to work as well.

 

Hang in there!

Link to comment
Share on other sites

Well I appreciate greatly the offer of help. Here is my configurations:

 

Remote Info

FTP Host: 69.50.193.12

Host Directory: /public_html/

Login: netgif

Password: xxxxx

Use Passive FTP is slected

 

I can successfully test this configuration.

 

 

Testing Server

Server Model: PHP/MySql

FTP Host: 69.50.193.12

Host Directory: /public_html/

Login: netgif

Password: xxxxx

Use Passive FTP is slected

URL Prefix: http://net-gift-shop.com/

 

I can successfully test this configuration.

 

Database

Connection Name: totalchoice

MySQL Server: 69.50.193.12

UserName: netgif_rob

Password: xxxxx - As set in CPanel

Database: netgif_test

 

When I test this connection I received "1045 Access denied for user: 'netgif_rob@server42.totalchoicehosting.com' (Using password: YES)

 

 

I have Access Hosts set to %

 

 

And now that I have written all this out - adding 69.50.193.12 to hosts works.

 

I guess % doesn't mean wildcard. After all that it was THAT easy to fix???

Link to comment
Share on other sites

I guess % doesn't mean wildcard. After all that it was THAT easy to fix???

 

woooot ...laughing as I remember exactly how I felt...

 

I believe that % does mean wildcard...but...well...I don't know how all that stuff works. I'm pretty sure I had to do the same thing that you just did!

 

Glad you got it fixed. Sometimes just talking (or writing) through something helps fix the problem!

 

Tracy

Link to comment
Share on other sites

Well IMHO it is still a configuration issue on TCH's part. The database I am still using does not require TCH's server's ip address, the % means what it is supposed to mean - allow access from anywhere. Seems to me they should look into it some more. I mean first off they set my user name up with a "-" in it, then CPanel doesn't work right so they tell me there is an issue with names with a hyphen in them!! Let me see....why the heck did you give me a name with a hyphen in the first place? And this issue trying to connect to the database seems peculiar to TCH. I hope they look into this stuff so others don't spend hours of their time playing around with misconfigured systems. What do I expect for $4 a month I guess?!

Link to comment
Share on other sites

Hi,

 

Rocket Rob, let me explain a few things.

 

1) Your username. When you sign up, we take the first couple of characters from your domain name and your own name if required, and if there is a - in the domain name, then unfortunately, because its all one big automated system, cpanel accepts it to be a valid username, when in fact, mysql and cpanel can't work together if a - is present. Because it is all automated, we have no way of changing it until after the event. Clients just need to drop a help desk ticket in and the job is done.

 

2) The tutorial for connecting to a database works for 99% of our client database. Just because you can connect to one, does not mean that you can connect to every other database, nor does it suggest that any part of the line, whether its you, us or the connection in between is wrong.

 

3) We treat all clients the same. Whether they pay us $4 a month or $300 a month, we treat each client as the same, and give each client exactly the same treatment. This, in my humble opinion is how all businesses should treat clients.

 

I am sorry if so far you have had an unhappy experience with totalchoice web hosting and I can only hope things improve between us Thumbs Up

 

Jim

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Well I gave up at first. Since I had a working database on my local machine. But lately the volume of work I have demanded that I design the sites on TCH's servers. So I had to get Dreamweaver to connect to the DBs here.

 

It turns out it's not that bad.

 

Make sure you setup all your UN/PW info in Site Definition.

 

Local Info:

---------------

Site Name: ?

Local Root Folder: ?

etc, etc...

 

Remote Info:

---------------

Access: FTP

FTP Host: ftp.******

Host Directory: /www/

Login: username

Password: ?

 

Testing Server:

-----------------

Server Model: PHP MySQL

Access: FTP

FTP Host: ftp.******

Host Dir: /www/

Login: username

Pass: ?

URL Prefix: http://www.******/

 

 

That's it for that area. Now go to create a record set in your document.

 

Click on 'Define...', then 'New'.

 

MySQL Connection:

-----------------------

Connection Name: whatever you wanna call this connection.

MySQL Server: www.******

UserName: username_username (we'll get to this in a second.)

Password: ???

 

OK now if you click 'Select', you should receive a list of the DBs under your account. But this isn't going to work unless you do a few things in CPanel first. (I had got to about this point when I gave up. :) )

 

Go into CPanel...

 

Go to MySQL Databases...

 

Under 'Access Hosts', either add % or your IP. I've tried 68.% and 68.%.%.% for example, and neither work.

 

Next, right above 'Access Hosts', is Users:. If you haven't added one yet, add one now. It is required for all this to work.

 

Now you've added a user and an access host, so the last thing to do is give the new user you created access to your databases. (I'm assuming you have databases already created.)

 

At the top of the page, you'll see a form with a bunch of check boxes. (Privileges:) Just leave "ALL" checked or check off whatever type of access you want to give to your user. Then click the submit button 'ADD USER TO DB'. The next screen will say, 'Account added to Access List', click 'Go Back', and you should see that the top half looks a little bit different now.

 

It will say...

 

Users in [yourDBname]

 

username_username (Privileges: ALL PRIVILEGES) [delete]

 

Connection Strings

.... etc etc.. (it will list PHP and Perl DB connection string for you to use.)

 

But you don't need none of that, because Dreamweaver will do your dirty work for you now.

 

Now back to Dreamweaver MySQL Connection settings....

 

MySQL Connection:

-----------------------

Connection Name: whatever you wanna call this connection.

MySQL Server: www.******

UserName: username_username (the username you created.)

Password: ???

 

Click on 'Select' and you should see your Database(s). Select it and your good to go.

 

I'm not giving any warranties, but this worked for me. And I'm able to duplicate it for the rest of my resold accounts with ease. It took me having to submit a help desk ticket to figure out that you have to "add the user to the DB.".

 

Hope this helps.. Good luck Thumbs Up

 

Rock Sign

Link to comment
Share on other sites

Okay you gurus I need help connecting from Dreamweaver MX 2004 to MySQL.

 

After reading this thread for a couple days now I believe I have done all the pre-requisites of creating a database with a table, creating a user with all privileges (and a password) and my "Access Hosts" include both "localhost" and "%".

 

 

MySQL Connection looks like:

 

Connection Name: testing123

MySQL server...: www.snibor.net

User name......: testuser

Password.......: ***********

Database.......:

 

When I click the select ICON i get the following error:

1045 Access denied for user: 'testuser@server38.totalchoicehosting.com' (Using password:YES)

 

In a previous posting (the 8th posting in this thread) rocket_rob had the same error. His problem was apparently solved by adding 69.50.193.12 to his "Access Hosts" via CPanel.

 

I don't know what IP Address to add to my Access Hosts??

 

 

Interestingly, when I tried the following MySQL connection:

 

Connection Name: testing123

MySQL server...: www.snibor.net

User name......: sniborn_testuser (this is how the ID appears in CPanel)

Password.......: ***********

Database.......:

 

I do not get an error, rather I am presented with a "select database" dialog box, but it is empty, no databases displayed to select.

 

Regardless, I honestly thought I could figure this out from the wealth of information in this thread but it's just evading me. Thanks ahead of time for any help you can provide.

 

Link to comment
Share on other sites

You know, it really helps to write down the problem because you re-visit the things that are required and double check them in a methodical manner.

After re-visiting each step I claimed to have completed (in my prior posting), I discovered the access priveledges had not been set for the user. I was certain I had set them, but they were not established as I had thought.

 

Thanks again for a great thread that helped me get connected!

Link to comment
Share on other sites

  • 1 year later...
Go into CPanel...

 

Go to MySQL Databases...

 

Under 'Access Hosts', either add % or your IP. I've tried 68.% and 68.%.%.% for example, and neither work.

 

Next, right above 'Access Hosts', is Users:. If you haven't added one yet, add one now. It is required for all this to work.

 

Now you've added a user and an access host, so the last thing to do is give the new user you created access to your databases. (I'm assuming you have databases already created.)

 

At the top of the page, you'll see a form with a bunch of check boxes. (Privileges:) Just leave "ALL" checked or check off whatever type of access you want to give to your user. Then click the submit button 'ADD USER TO DB'. The next screen will say, 'Account added to Access List', click 'Go Back', and you should see that the top half looks a little bit different now.

.....

 

I got lost somewhere here.

 

I think I might look like an idiot by asking

but what is the CPanel you're referring to here??????

I can't seem to find it anywhere and I'm about to go crazy.

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...