Webmatrix cannot connect to MySQL hosts [Answered]RSS

24 replies

Last post Jul 26, 2011 08:49 PM by HCamper

  • Webmatrix cannot connect to MySQL hosts

    Jul 19, 2011 03:07 PM|toejklemme|LINK

    Hi When trying to set up a new Wordpress page webmatrix comes with an error message after i have filled out database username and so on. I get this error message: --------------------------- Microsoft Web Application Gallery --------------------------- The source is invalid. Cannot connect to the database ''. Cannot connect to the database ''. Unable to connect to any of the specified MySQL hosts. --------------------------- OK --------------------------- Anyone knows what i am doing wrong??
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 19, 2011 07:46 PM|simtan|LINK

    Hello,

    Have you seen this post?

    http://forums.iis.net/t/1177760.aspx

    Simon Tan
    Program Manager
    Web Platform and Tools
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 11:37 AM|specht15|LINK

     I too have the exact same problem.

    Installed webmatrix and ran program then enter Site from Web Gallery then download WordPress for website and enter the db info and it comes up with this error after pressing continue. I have tried the password correction methods and clean uninstall wiping clean the mysql folder as well as complete uninstall and reinstall or webmatrix. There is no password info or user info listed in the error message the above is all that is noted. I have no idea how to get past this.

    Any help would really be appreciated.

    Gateway PC 64-bit Vista OS wirelessly connected to Linksys WRT54G2 Router

     

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 12:03 PM|HCamper|LINK

    Hello @ ALL,

    I suggest you check this http://forums.iis.net/t/1179854.aspx thread

            in the Web Matrix Forum  the post by Zombie2011

        goes step-by-step with links in the MySQL Documentation

       for Password Recovery or Reset.

      The Post Title is for "Joomla!" but the steps will work for others.

              If the thread by Zoombie2011 works for you add a comment to that thread. 

    Martin

      

     

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 08:29 PM|specht15|LINK

     whenever i try to go into the command prompt i type "C:\ProgramData\MySQL>--init-file=mysql-init.txt" and it says...

    " Access is denied."

     I have MySQL Connector Net 6.3.7 in C:>Program Files>MySQL

    my MySQL Server 5.1 is C:>ProgramData>MySQL

     I've got to be doing something wrong, this really seems like a ridiculous problem to have. I mean I know i'm not blessed as far as IQ goes but it can't be this hard to get a database up in webmatrix.

     

    ---------------------------
    Microsoft Web Application Gallery
    ---------------------------
    The source is invalid.
    Cannot connect to the database ''.
    Cannot connect to the database ''.
    Unable to connect to any of the specified MySQL hosts.

    ---------------------------


    ^ I'm not getting any password mention in my error text..?

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 08:54 PM|HCamper|LINK

    Hello,

    When your at the command prompt does the Title Caption show Administrator ?

    If do not have an Elevated Command create a short-cut on the desktop to C:\Windows\system32\cmd.exe

       then change the properties of the short-cut to RunAs Administrator.

    You can use the short-cut for Elevated Command Prompt operations. 

    Did you stop the "MySQL Server Service" in the Admininstrator Tools and "Services" before using the command prompt ?

     Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 09:10 PM|specht15|LINK

     I appreciate the fast response.

    The server was stopped and again running it as administrator I enter "C:\ProgramData\MySQL>--init-file=mysql-init.txt" and get....

    'ProgramData\MySQL' is not recognized as an internal or external command, operable program or batch file.

    -----------------------------------------------------------

    dam it....

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 09:25 PM|HCamper|LINK

    Hello,

    You likley have a typo in the file.

    Stop the MySQL Server and recheck the items.

    Keep calm and watch the words :D

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 09:51 PM|specht15|LINK

     Haha hmm well my .txt file reads..

     

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';

    FLUSH PRIVILEGES;

     

    I entered my password in place of 'MyNewPass' and saved the file as 'mysql-init.txt'

     Is there something wrong with the text file or what i'm giving in the command prompt?

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 10:06 PM|HCamper|LINK

    Hi,

    It looks like the commands are ok.

    The text file may have some thing wrong.

    Martin

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 10:36 PM|specht15|LINK

    Hmm.. well i really appreciate all your help

    I really have no idea what it could be

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 10:47 PM|HCamper|LINK

    Hi,

    Well I guess it's back to Uninstall MySQL Server using the Windows installer

    Then restart the Windows System.

    Remove the remains (left-overs) in the C:\Program Files\MySQL Server 5.1\ and C:\ProgramData\MySQL Server 5.1\Data folders.

    Then use the Windows Installer to install MySQL Server again.

    I suggest you use the MySQL Instance Configuration tool to set-up the

    MySQL Server http://learn.iis.net/page.aspx/610/walkthrough---set-up-mysql-51-for-php-applications/  as shown in the IIS Net Guide.

    Martin

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 11:29 PM|HurtigTechnologies|LINK

    Uninstall MySQL Using Windows Installer then delete all the leftover configuration data like you said, but let WebMatrix install MySQL for you. Once everything is removed just go to WebMatrix and click on WordPress. WebMatrix will download and install MySQL with the Correct Configuration automatically and then have you define the root password. It should save you a lot of time and headaches.

    MySql WebMatrix database

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 11:39 PM|specht15|LINK

     wow.. still nothing after all that. Followed all your instructions to the letter and it uninstalled and installed smoothly through the configuration tool. Thought for sure it'd work and the exact same error message popped back up.... I don't understand what's wrong

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 20, 2011 11:45 PM|specht15|LINK

     @HurtigTechnologies

     That was what I tried first and it worked flawlessly on my office PC now at home on my personal PC this error is driving me crazy... I've tried going through WebMatrix to setup MySQL and through manual install through mysql website and just about everything else in the forums I've read to get around it. The whole program is useless until I do so I'm going to keep trying.

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 21, 2011 12:26 AM|simtan|LINK

    Hmm, perhaps the solution is changing what you put into the form that WebMatrix presents when you first install the application. The database location should be "localhost".

    See step 8 in this walkthrough:

    http://www.microsoft.com/web/post/your-first-website-using-webmatrix

    Simon Tan
    Program Manager
    Web Platform and Tools
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 21, 2011 07:45 AM|specht15|LINK

    @simtan

    It's doing something because I've followed that guide too. And I've never gotten past step 8. I've made sure the information was exact including localhost

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 21, 2011 09:29 AM|HCamper|LINK

    Hello,

    In looking at step 8 the Web Matrix Guide problem maybe with the Firewall and MySQL Server?

    Could you open Windows Advanced Firewall and look for

    Rule or Exceptions for MySQL Server and Port 3306 listed?

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 21, 2011 09:48 AM|specht15|LINK

     OK I will update later tonight when I have time to check it out. I assume Windows Firewall can be accessed in Administrative Tools from System Maintenance in the Control Panel?  Don't really know how I assign individual Port exceptions for programs, but I'll look around. Again, thank you for all the help.

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 21, 2011 08:34 PM|specht15|LINK

     Well I went into Firewall settings and created an inbound rule that opened port 3306 for the MySQL server enabled it and it's still not working. I'm about to just try Visual Studio Web Developer Express and pray that somehow makes it through setup lol... i dunno what else to do honestly... if anyone has any other suggestions tho lemme know

    UPDATE:

    Same exact problem when installing Wordpress and entering DB info in VS Web Dev. Express 2010.......... anyone know how to fix this or know anyone/anyplace i could run my pc to, I'd pay really good money to get this running. 

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 26, 2011 02:05 PM|HCamper|LINK

    Hi @ specht15,

    It appears that your problems are not IIS Server or installer problems.

    Looking over the previous posts there is common pattern that maybe related to (UAC)

           profile and folder settings.

    I suggest you visit the "Seven Forums" or "How-to-Geeks" and read the tutorials

               and suggestions for User Access Control and doing some Changes for Menus and TaskBar settings.

    Martin

     

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 26, 2011 02:46 PM|specht15|LINK

     Hmm I  don't know the exact problem so I just don't know how much luck I'm going to have browsing tutorials is my worry.. I'm going to call Microsoft this evening and if the problem continues I'm just going to resort to using a louisville slugger to the casing of the unit itself in honor of Michael, Peter and Samir.

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 26, 2011 07:03 PM|HCamper|LINK

    Ok,

    I do have a suggestion the MVP Web Site  http://www.itknowledge24.com/about.html 

    and download the pdf  for User Acccount in the library and read the instructions.

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 26, 2011 08:46 PM|specht15|LINK

     @ HCamper

     Well Microsoft wasn't having any of it unless I shelled out a mortgage payment for tech support. Could you by any chance direct me to any specific tutorials? It seems odd I seem to be the only soul on the web with this exact problem. All the other MySQL host connection error messages had some extra information listed...

  • Re: Webmatrix cannot connect to MySQL hosts

    Jul 26, 2011 08:49 PM|HCamper|LINK

    Hi,

    Did you check out http://www.itknowledge24.com/library.html Guides ?

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011