close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Cannot connect to mysql

Thread began 2/07/2010 4:42 am by J7HNW | Last modified 2/08/2010 2:21 pm by Office Guy-172461 | 2103 views | 5 replies |


Cannot connect to mysql


Have just bought ECart 5 so need to learn how to work this in PHP. I always used ASP but figured I need to switch as you have dropped ASP. So I need to set up my first SQL database.

I have installed XAMP as per instructions on your site . If I hit the URL localhost - all is running properly , PHP info looks good etc etc

So my local testing server is set up. I set it to run as a service when Windows 7 starts

However when I go into Dreamweaver and open a PHP file - and then try to add a MySQL connection - I get stuck

I get a screen - and I am setting as follows. I am trying this with "root" and no password as I cannot get in wth anything and I gather this is the default User

Connection name : hair
MySql: localhost
User Name: root

When I browse for the database - I am gettng MySQL Error#:1045
Access denied for user 'root'@localhost ( using password: NO )

Please can you help . I need to get the site done quickly and just need to get started



Sign in to reply to this post

Office Guy-172461

Have a look at:

Logging into a MySQL database

Creating a dynamic site definition in Dreamweaver

Sign in to reply to this post



Hi and thanks for your reply.

I am using XAMP. When I try to log in as "root " which is clearly stated as a super user in your "logging into a database " article - I am not allowed in. It says Root does not reequire a password - so I am entering root as user and leaving the password field blank

The site is set up correctly as per your other aricle - except my XAMP is in the folder
c:\xammp\xammp\htdocs . It is not a powerstore site so I have not applied this path.

Indeed I have set up a site called Hair for men as follows

c:\xammp\xammp\htdocs\Hair for men\httpdocs\

This is where my php files are stored. Under httpdocs - I have added a folder called data - and the SQL database is in the data directory

c:\xammp\xammp\htdocs\Hair for men\httpdocs\data\

I should in theory be able to log in and browse to this file - shouldnt I ?

Sign in to reply to this post

Office Guy-172461

I think you missed this note:

The name should not include any spaces or special characters. You should never use spaces or special characters in folder or file names for a website, because they cause problems on most PHP servers.

You can't just put a database into a folder. It must be imported into your mySQL server:

Exporting and Importing a database using phpMyAdmin

Sign in to reply to this post


Thanks - but still a problem

Hi and thank you for your speedy response.

I have renamed the site Hairformen so all folders now have no spaces ( sorry I did miss this )

Local Info now reads

Root folder is now : C:\xampp\xampp\htdocs\Hairformen\httpdocs\
Root images folder : C:\xampp\xampp\htdocs\Hairformen\httpdocs\images\

Testing Server PHP MySQL
Access: Local / Network
Testing server folder: C:\xampp\xampp\htdocs\Hairformen\
URL Prefix: Hairformen/

I have gond to the URL localhost which opens up PHP Admin

Here I am being asked for a User name and Password to log in

I have typed in root and left the password blank - and yet again I still cannot get into the Admin Panel to set up my database.

I am sorry for the confusion - I have done many ASP sites but cannot get my head around this. Hope you can help. Once I have managed to get the database into the site I am hoping there will be similarities on the PHP pages to the ASP I have always worked with.

Thank you


Sign in to reply to this post

Office Guy-172461

When you setup XAMPP you should have been asked to supply a password for mySQL. That is the password it's asking for.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...