Copy link to clipboard
Copied
Hi,
I have been going through a few tutorials where Dreamweaver CS5 connects to a MySQL database. On all occassions, within Dreamweaver i can always connect to the MySQL database (from XAMPP 1.7.3) successfully with the root user but when i try to connect with any other user, it fails with the same Dreamweaver error message of:
MySQL Error#: 1044
Access denied for user 'cs5write'@'localhost' to database 'phpcs5'.
Both MySQL and Apache servers are running and i have re-typed the password (as in the book) many times. This has also happened previously with other tutorials (using the same MySQL database), where i can connect within Dreamweaver via root but by no other user. I was able to continue before using the root connection but not this time, so i am stuck!
At the moment, i am going through the new book "Adobe Dreamweaver CS5 with PHP" by David Powers. I previously started this from the Creative Edge website but now i am going through the actual book that has just been released. If it is any use to anyone, i have failed at the top of page 173, when clicking on "Test" to connect to the database. I am trying to connect with a user called "cs5write" with privileges of Select, Update, Write and Delete.
One thing i have noticed in phpMyAdmin is that when i try:
Home - Privileges, the cs5write and cs5read users are there as expected.
But when i go:
Home - phpcs5 (the database on the left) - Privileges, only cs5read is listed without cs5write. When i created the cs5write user there were no errors reported.
Any advice or suggestions very much appreciated.
Cheers,
kane77
Copy link to clipboard
Copied
Try creating a new user for your local MySQL database in whatever MySQL admin you are using (I really like Navicat) - I like to create the user with the exact same username and password that the database on the live server will eventually be using - this way you don't have to modify any code when you upload your site. Now give this use access to only the one database you'll be connecting to for the particular site you'll be working on and then give this use full permissions to this database, and save the user. Then create your site data source with the same data source name you'll be using on the server, thus creating, as far as you code is concerned, a mirror setup.
This should get you connected and it will also streamline the process when you start uploading and testing on the server.
Hope this helps.
--
Lawrence Carmer - *Adobe Community Professional*
http://www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in PHP and ColdFusion
Stay updated - http://blog.cartweaver.com
Copy link to clipboard
Copied
Thanks Lawrence. I recreated the accounts as you suggested and eventually got a connection working, even though i am not sure what exact point made the difference. But this is all new knowledge can use next time.
Many thanks,
kane77