Jump to content


Photo

Mysql Conn [Merged]


  • Please log in to reply
16 replies to this topic

#1 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 05 October 2005 - 04:43 PM

well I am new to databases but usally can get done with what i am trying to do. I can not make a mysql connection using dream weaver and this hosting. I have a defined site called breadcrumbs. I have created a mysql database in cpanel, and a user also have added the user to the database. it looks like this: database name= mx_breadcrumbs, user = amf_sf password ****. when i fill out the dreamweaver connect to a database i use the following:connection name =breadcrumbs mysql server = amfmechanical.com user name = amf_sf user password = **** database = mx_breadcrumbs I have tried several different combos with these options but do not seem to get anywherwe. Can any one help? usally the message is that the host can not be found. Seems like an easy one but i don't know what it is.I am going home now so will not be able to respond for a while but please give advise....

Thank You
Steve

#2 stevevan

stevevan

    Immediate Family

  • Members
  • PipPipPipPip
  • 3,522 posts

Posted 05 October 2005 - 05:32 PM

If I remember correctly, when you connect to your database, the database name needs to be "cpanelname_databasename" and your username needs to be "cpanel_username". (Note the underscore between the CPanel name and database or username.)
Steve, W4SJV

"When all else fails (and it will)...there's Amateur Radio!"
"It is better to let people THINK you're a fool than to open your mouth and remove all doubt."

#3 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 06 October 2005 - 04:19 PM

Strange I thought posted this yesterday but I do not see it. Oh well letís go again. I cannot seem to hook up to mysql using dreamweaver mx2004. I go and create a database in c panel, fill out the right data (so I think) but the error I keep getting is that there is an ftp error because it cannot find the host server.
I called the database mx_breadcrumbs called the user amf_sf and the password ********
I also added the user to the database. I have tried many different ways. DWMX2004 wants the:
Connection name: breadcrumbs
MySql server: ftp.amfmechanical.com
User name:amf_sf
Password:******
Database: mx_breadcrumbs

so when I click test or select for database name I have been getting the error message can not find server. I think this is an easy one for those in the know. I have looked at it so long now I get brain freeze. I would really appreciate any help someone can give.

Thanks
Steve

#4 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 06 October 2005 - 04:27 PM

If I remember correctly, when you connect to your database, the database name needs to be "cpanelname_databasename" and your username needs to be "cpanel_username". (Note the underscore between the CPanel name and database or username.)


Thanks for the reply I also posted this in script section. I did that because i forgot i posed this here and thought thingfs just got messed up sorry. Any way not to be any more dumb about this but... what is my cpanel name? my site name? server number? I guess i do not know.

thanks
Steve

#5 abinidi

abinidi

    Immediate Family

  • Members
  • PipPipPipPip
  • 1,420 posts

Posted 06 October 2005 - 04:37 PM

Your cpanel name is the the username that you use to log into your cPanel for your website.

So, if when I go to example.com/cpanel, and I log on with:

username: luke
password: skywalker

And I have the following database:

database name: starwars
database user name: darthvader
database user password: darkside

When programs ask for my database information, I have to give them:

database name: luke_starwars
database user name: luke_darthvader
database user password: darkside

Note that the database user password IS NOT prepended with the cPanel login name.

Does that help?
Paul Pehrson
Herriman, UT

Posted Image Posted ImagePosted ImagePosted ImagePosted Image



#6 GroovyFish

GroovyFish

    Immediate Family

  • Members
  • PipPipPipPip
  • 691 posts

Posted 06 October 2005 - 04:39 PM

Hi Steve,

Your Cpanel name is the same as your login to cpanel. So if your login to cpanel is xyz123 and you named your database "mydb" the actual database name will be: "xyz123_mydb".

Same goes for the database username: if your set up your database user to be steve, the actual database username will be: "xyz123_steve".

Don't forget after creating your database and the database user, you must add the user to the database.

You might want to read through this post: http://www.totalchoi...?showtopic=1803 it's a couple years old but I would imagine that it would pretty much remain the same.

Read the whole thing, the first post says you must contact the Help Desk, but if you read to the bottom, you will find that it is not necessary.

Edited by GroovyFish, 06 October 2005 - 04:42 PM.


#7 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 06 October 2005 - 05:16 PM

thanks abinidi and groovyfish I have put that info in what I think my be wrong now is the MySql server: which is what dreamweaver asks. I still get the same error saying can not find server. MySql server: amfmechanical.com
i tried ftp.amfmechanical.com and bunch of other ways. Thanks for the help and any more you may have.

Steve

#8 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 19,960 posts

Posted 06 October 2005 - 05:25 PM

Have you also added your IP address to the allowed hosts in the database section of cpanel?

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.


#9 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 06 October 2005 - 05:33 PM

No but i did read what was recommended and I added the % sign in cpanel under hosts, but this still does not do it. Also I have a changing ip everytime i sign on or shut down and i have an office i work form as well. So how would I be able to put in an ip where its been said to?

Thanks very much

Steve
PS I tried putting %sign into the dreamweaver program where it asks for MySql server: but that does not work either..

#10 acsteve

acsteve

    Family Friend

  • Members
  • PipPip
  • 49 posts

Posted 06 October 2005 - 05:45 PM

GOT IT.... man o man how nice. I just added the % sign in cpanel, then localhost in MySql server and boom. Thanks you 3 i got something from everyone. I read what you suggested grooveryfish and that really helped once again thanks..

Steve

#11 nortk

nortk

    Immediate Family

  • Members
  • PipPipPipPip
  • 511 posts

Posted 06 October 2005 - 05:56 PM

First, the MySQL server should be set to localhost

Then, yes, as TCH-Andy said, there's something wrong with your username and database name. If you create a MySQL database and name it junk, and create a user and name it junkuser, the REAL user and dbnames will have your CPanel username at the beginning.

So, for example, if your CPanel username is joey, your db username will be joey_junkuser, and your dbname will be joey_junk

You would need to enter these into Dreamweaver for the username and password.
Time flies like the wind.
Fruitflies like bananas.

#12 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 19,960 posts

Posted 06 October 2005 - 06:19 PM

;)

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.


#13 TweezerMan

TweezerMan

    Immediate Family

  • Members
  • PipPipPipPip
  • 1,763 posts

Posted 06 October 2005 - 09:27 PM

MySql server: ftp.amfmechanical.com

First, the MySQL server should be set to localhost

Actually, the MySQL server should be set to 'amfmechanical.com', and as TCH-Andy said, your IP address needs to be added to the 'Access Hosts' section of CPanel / MySQL Databases.
David Phillips (TweezerMan)
The Tweezer's Edge v3

#14 nortk

nortk

    Immediate Family

  • Members
  • PipPipPipPip
  • 511 posts

Posted 06 October 2005 - 09:34 PM

Sorry, didn't know. Is there an advantage (perhaps security-related) of using the domain name vs. using localhost? I've used localhost in the past without a problem.

Thanks for any advice!
Time flies like the wind.
Fruitflies like bananas.

#15 TweezerMan

TweezerMan

    Immediate Family

  • Members
  • PipPipPipPip
  • 1,763 posts

Posted 06 October 2005 - 10:00 PM

It's not a matter of advantage (security-related or otherwise) - the host name specifies what machine the MySQL server is running on.

When you are running a PHP script on the TCH server, the MYSQL server is on the same machine, so you would specify the MySQL host name as 'localhost' in your connection parameters to reflect this.

When you are using DreamWeaver on your home PC, the MySQL server you want to connect to is still on the TCH server. To connect to it, you have to give the domain name of your site so the TCH MySQL server can be found from your home PC.

If you specify 'localhost' as the MySQL host name in DreamWeaver, DreamWeaver will try to locate and connect to a MySQL server running on your home PC (not the TCH server). Most home users do not run their own MySQL servers, and their intent is to indeed connect to the TCH MySQL server. The use of 'localhost' and a user's domain name as the MySQL host name is not interchangeable, as each one tells DreamWeaver to try to connect to a MySQL server on different machines.
David Phillips (TweezerMan)
The Tweezer's Edge v3

#16 MikeJ

MikeJ

    Big Gorilla

  • Members
  • PipPipPipPip
  • 2,369 posts

Posted 07 October 2005 - 01:23 AM

Two threads were merged as it was the same discussion.
<a href="http://twitter.com/skraggy" target="_blank">Twitter</a> | <a href="http://plurk.com/skraggy" target="_blank">Plurk</a>

#17 nortk

nortk

    Immediate Family

  • Members
  • PipPipPipPip
  • 511 posts

Posted 07 October 2005 - 05:03 AM

Thanks TCH-David. That makes sense to me.

Dreamweaver does allow me to use localhost to connect to the TCH MySQL server, but I believe that's because I've configured Dreamweaver to use my TCH Server as the testing server. So, if I start editing a PHP page in Dreamweaver, and want to test the MySQL connection, Dreamweaver does it by uploading a temporary copy of the page to my TCH site where, from what you explained, localhost will work fine. So, I guess it gives me the illusion of using localhost here at home, even though it's all really happening on the TCH end.

Thanks again for your explanation.
Time flies like the wind.
Fruitflies like bananas.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users