acsteve Posted October 5, 2005 Share Posted October 5, 2005 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 Quote Link to comment Share on other sites More sharing options...
stevevan Posted October 5, 2005 Share Posted October 5, 2005 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.) Quote Link to comment Share on other sites More sharing options...
acsteve Posted October 6, 2005 Author Share Posted October 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
acsteve Posted October 6, 2005 Author Share Posted October 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
abinidi Posted October 6, 2005 Share Posted October 6, 2005 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? Quote Link to comment Share on other sites More sharing options...
GroovyFish Posted October 6, 2005 Share Posted October 6, 2005 (edited) 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.totalchoicehosting.com/forums/i...?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 October 6, 2005 by GroovyFish Quote Link to comment Share on other sites More sharing options...
acsteve Posted October 6, 2005 Author Share Posted October 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 6, 2005 Share Posted October 6, 2005 Have you also added your IP address to the allowed hosts in the database section of cpanel? Quote Link to comment Share on other sites More sharing options...
acsteve Posted October 6, 2005 Author Share Posted October 6, 2005 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.. Quote Link to comment Share on other sites More sharing options...
acsteve Posted October 6, 2005 Author Share Posted October 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
nortk Posted October 6, 2005 Share Posted October 6, 2005 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. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 6, 2005 Share Posted October 6, 2005 Quote Link to comment Share on other sites More sharing options...
TweezerMan Posted October 7, 2005 Share Posted October 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
nortk Posted October 7, 2005 Share Posted October 7, 2005 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! Quote Link to comment Share on other sites More sharing options...
TweezerMan Posted October 7, 2005 Share Posted October 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
MikeJ Posted October 7, 2005 Share Posted October 7, 2005 Two threads were merged as it was the same discussion. Quote Link to comment Share on other sites More sharing options...
nortk Posted October 7, 2005 Share Posted October 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.