arjetag Posted July 20, 2009 Share Posted July 20, 2009 Hi there, I have installed PHPMyAdmin in my server and from there I have created a mysql database and a table within it. Now, since I want to create an application Form... I need to connect my database with Dreamweaver. I spend my whole day trying this... and didn't succeed Here is what I did in Dreamweaver CS3: Create a FTP connection with my site and then open MYSQL Connection window: Connection name: mydatabase My SQL Sever: localhost (I also tried with my IP addresses, and didn't work either) Username: root (username of www.domain.com/phpmyadmin) Password: xxxx (same as above/pass) Database: mydatabase I am getting the message "An unidentifed error has occurred" each time I'm trying this. localhost should be the name of my MySQL Server,... because I've seen it in PHPMyAdmin window Can anybody help me pleaseeeee with this?! Thnx Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/ Share on other sites More sharing options...
JonnoTheDev Posted July 20, 2009 Share Posted July 20, 2009 This will be because you wont have permission to connect to the database from your public IP. You need to grant access using the MySQL GRANT syntax. Why connect to your database through DW? Can't you write the SQL yourself rather than get DW to do it (DW generates lots of un-necessary crap code) and just upload to the server to test? Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-878730 Share on other sites More sharing options...
arjetag Posted July 20, 2009 Author Share Posted July 20, 2009 Hey Neil, Thanks for your reply. I have imported table to a database. To get that code... I have to go to phpmyadmin/SQL... right? And then, back to Dreamweaver... paste that and upload to the server... ???? I assume that I need to add some extra code for this! I appreciate some more help for this... Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-878924 Share on other sites More sharing options...
arjetag Posted July 20, 2009 Author Share Posted July 20, 2009 How can I have permission to connect to the database from my public IP??? I am working in my company's server in which I have full access and xamp is installed??? Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879013 Share on other sites More sharing options...
JonnoTheDev Posted July 21, 2009 Share Posted July 21, 2009 I am working in my company's server in which I have full access and xamp Ok, a local server. I would guess that your connection string is incorrect. Double check your hostname, username & password. Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879295 Share on other sites More sharing options...
BMurtagh Posted July 21, 2009 Share Posted July 21, 2009 I would check the privileges for the root user on the database and would also attempt to connect to the database in your code & perform a select command. This would help clarify whether a connection can be made to mysql & data can be returned. If this works then the issue is isolated between Dreamweaver & MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879311 Share on other sites More sharing options...
jayjay960 Posted July 21, 2009 Share Posted July 21, 2009 Thanks for your reply. I have imported table to a database. To get that code... I have to go to phpmyadmin/SQL... right? And then, back to Dreamweaver... paste that and upload to the server... ???? It would be much better to just learn sql yourself. It's a very simple language. Also I wouldn't be surprised if the problem was just Dreamweaver. Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879340 Share on other sites More sharing options...
arjetag Posted July 21, 2009 Author Share Posted July 21, 2009 Yes... I put a code (see below) <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'petstore'; mysql_select_db($dbname); ?> I used the same user/pass... host names... like in Dreamweaver and it worked here. So, I assume that the problem is in Dreamweaver. But now... I have to create a form and that's why I need Dreamweaver, otherwise I don't know how to do it!!! Does anybody know how can I combine these things... and make my online appilcation form in DW. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879345 Share on other sites More sharing options...
jayjay960 Posted July 21, 2009 Share Posted July 21, 2009 If you're going to be doing advanced-ish stuff like this (involving mysql anyway), you should probably learn html and css for designing web pages. wysiwyg editors like dreamweaver usually add a lot of unnecessary code, plus you don't have as much control. www.w3schools.com have some html and css tutorials, or it might even be worth taking out a book on html from your library. Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-879349 Share on other sites More sharing options...
arjetag Posted July 22, 2009 Author Share Posted July 22, 2009 Well... I used those tutorials and they help me a lot! I know how to create a form html/css, but when it comes to MYSQL, it's much more easy for me to create a connection with Dreamweaver to my database (MySQL). I started learning MySQL too... but it will take to much time for my to make this application form, write all those codes... and everything... I don't know if I can find mysql codes for this connection Quote Link to comment https://forums.phpfreaks.com/topic/166625-help-cannot-connect-to-mysql-database-through-dreamweaver/#findComment-880607 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.