Jump to content


Photo

Dreamweaver Mx, Php, Mysql


  • Please log in to reply
21 replies to this topic

#1 KevCraighead

KevCraighead

    New To The Neighborhood

  • Members
  • Pip
  • 5 posts

Posted 29 October 2003 - 09:18 AM

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!

#2 Dennis

Dennis

    Family Friend

  • Members
  • PipPip
  • 92 posts

Posted 29 October 2003 - 09:52 AM

Try this tutorial.

Also you might want to try setting up a test server on yr PC....this package is a useful one where PHP, MySql and Apache are preconfigured and allows you to run it on your window box.....PHPDev.

Dennis
Look before leaping, and check before signing....

#3 natimage

natimage

    February Family member of the month

  • Members
  • PipPipPipPip
  • 824 posts

Posted 29 October 2003 - 07:16 PM

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
Tracy
Natural Images Photography


<A HREF="ymsgr:sendIM?natimage72"><IMG SRC="http://www.tchstatus.com:8080/yahoo/natimage72"></a>

#4 rocket_rob

rocket_rob
  • Members
  • 3 posts

Posted 29 October 2003 - 09:37 PM

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.

#5 TCH-Dick

TCH-Dick

    General Manager

  • Admins
  • PipPipPipPip
  • 5,786 posts

Posted 29 October 2003 - 11:34 PM

When I click test I get "Unknown error".


Check the URL Prefix in the Site Definition

for example: http://www.yoursite.com/ is the correct setting

Dick DeVance
General Manager
TotalChoice Hosting, Inc
dick@totalchoicehosting.com


Posted Image


#6 KevCraighead

KevCraighead

    New To The Neighborhood

  • Members
  • Pip
  • 5 posts

Posted 30 October 2003 - 04:55 AM

Thanks for the help everyone! I am in the process of trying the suggestions out. Tracy's page was particularly helpful!

#7 natimage

natimage

    February Family member of the month

  • Members
  • PipPipPipPip
  • 824 posts

Posted 30 October 2003 - 08:13 AM

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!
Tracy
Natural Images Photography


<A HREF="ymsgr:sendIM?natimage72"><IMG SRC="http://www.tchstatus.com:8080/yahoo/natimage72"></a>

#8 rocket_rob

rocket_rob
  • Members
  • 3 posts

Posted 30 October 2003 - 11:25 AM

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

#9 natimage

natimage

    February Family member of the month

  • Members
  • PipPipPipPip
  • 824 posts

Posted 30 October 2003 - 02:34 PM

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
Tracy
Natural Images Photography


<A HREF="ymsgr:sendIM?natimage72"><IMG SRC="http://www.tchstatus.com:8080/yahoo/natimage72"></a>

#10 rocket_rob

rocket_rob
  • Members
  • 3 posts

Posted 30 October 2003 - 10:57 PM

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?!

#11 TCH-Dick

TCH-Dick

    General Manager

  • Admins
  • PipPipPipPip
  • 5,786 posts

Posted 31 October 2003 - 01:27 AM

Well IMHO it is still a configuration issue on TCH's part.

I don't see how that can be, I have NO problems connecting to my databases with DW.

Dick DeVance
General Manager
TotalChoice Hosting, Inc
dick@totalchoicehosting.com


Posted Image


#12 TCH-JimE

TCH-JimE

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 2,738 posts

Posted 31 October 2003 - 05:19 AM

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
J

#13 roccocapra

roccocapra

    New To The Neighborhood

  • Members
  • Pip
  • 12 posts

Posted 31 October 2003 - 09:12 AM

Hey rob,

What ever you do don't go to xxxx, they SUCK!!

Hi, Please do not put down other hosters in these forums. We are not out to tell tales or slander other companies Jim

Edited by Jimuni, 31 October 2003 - 09:25 AM.


#14 datamark

datamark
  • Members
  • 3 posts

Posted 08 December 2003 - 03:16 AM

I would like to say that every question & then every answer here has helped me in resolving the same problem I was having with the MYSQL & DreamweaverMX on TCH.
Thank you for the Q & As in here.
Mark

#15 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 08 December 2003 - 10:49 AM

Hi Mark, you are most welcome,
and also
:blink: Welcome to the family :dance:

and your new home.

hope you will be a regular here.
if you need anything, just ask.

#16 tr4nc3

tr4nc3

    Family Friend

  • Members
  • PipPip
  • 47 posts

Posted 11 March 2004 - 09:10 PM

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

#17 TCH-Rick

TCH-Rick

    Technical Support Services Manager

  • Members
  • PipPipPipPip
  • 1,853 posts

Posted 11 March 2004 - 09:12 PM

Glad you have it working and thanks for posting the update to help other folks in the future.

#18 TCH-Rob

TCH-Rob

    Help Desk Manager

  • Members
  • PipPipPipPip
  • 7,797 posts

Posted 11 March 2004 - 09:24 PM

Just moving to a better forum.

#19 deecos

deecos

    New To The Neighborhood

  • Members
  • Pip
  • 13 posts

Posted 15 March 2004 - 07:54 PM


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.


deecos

"If you're not making mistakes then you're not doing anything."

#20 deecos

deecos

    New To The Neighborhood

  • Members
  • Pip
  • 13 posts

Posted 15 March 2004 - 08:19 PM

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!
deecos

"If you're not making mistakes then you're not doing anything."

#21 xwenx

xwenx
  • Members
  • 1 posts

Posted 06 December 2005 - 03:12 PM

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.

#22 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 19,960 posts

Posted 06 December 2005 - 03:45 PM

Welcome to the forums.

cPanel is the site adminstration panel for your site. Same place you create email addresses, subdomains, etc...

Are you hosted here?

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users