We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Create MySQL database with WebMatrix website? [Answered]RSS

4 replies

Last post May 29, 2011 04:30 PM by haymanpl

  • Create MySQL database with WebMatrix website?

    Dec 01, 2010 04:40 PM|tzmedia|LINK

    Hi All, I'm confused about what are the tools to use to create a MySQL database for use with a new website in WebMatrix. I'm trying to install a MODx website, but the default script is installing the site with a demo sample site already populated in the database. When installing the application, from using the normal web methods, there is a check box option so that the sample site, will not be installed. Not knowing what all the sample site consists of I can't easily delete the extras. Main question then is there a way or tools for working with MySQL databases using WebMatrix and the IIS Server Express? If not it sort of defeats the whole purpose of using WebMatrix for a localhost designed dev site for initial design and creation of themes, templates, etc with an existing CMS application, or at least is somewhat limiting to only using the web gallery apps default options.

    WebMatrix IIS Express MySql manage mySQL create database

  • Re: Create MySQL database with WebMatrix website?

    Dec 02, 2010 11:13 AM|faith_a|LINK

    Hi,

    Today in WebMatrix we do not have an option to create MySQL databases from scratch, they are only created during application installs. If you need to start with a clean MySQL database, you can create one outside of WebMatrix and then connect to it. We have full support for management tasks like adding data, editing schema, etc.

    To use MySQL Command Line:

    Go to Start > All Programs > MySQL > MySQL Server %version% > MySQL Command Line Client
    Enter your root password
    Enter the following (change the name of the database) and hit Enter: create database modx123;

    To connect to a database:

    Go to the Databases workspace
    Click the New Connection button in the ribbon
    Enter the credentials and database name 
    Optional: Check Save Password and Add to web.config so that it will be included during publish

    We are considering this feature for a future version, but it's not something we'll have in our version 1.

    Thanks,

    -faith

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Create MySQL database with WebMatrix website?

    Dec 02, 2010 11:29 AM|tzmedia|LINK

    Thanks Faith, that helped alot, I'll give a shout if I have problems.

    This will make me sound like a n00b for sure, but I was totally overlooking the ribbon controls.
    I was looking within the content area of Webmatrix, under databases, where the only option was:
    Add a database to your site, and SQL compact being the only option there.

    Was the ; semi color part of the command line for create the database, it looks like it was ;)

    Does this sound like confirmation that the Db was indeed created then in MySQL,
    still stepping throough it, but here was the command line prompt following entering that line: -------------------------------------------------------------------------------
    mysql> create database modxblank;
    Query OK, 1 row affected (0.08 sec)
    ---------------------------------

    Query OK seems like an odd way of confirming the database creation, but does that sound right then?

    --------- I had no idea Windows had a command line program in there with MySQL, I won't be afraid to go into command line now for working with MySQL.

    Any other MySQL tools you would recommend for creating databases etc. just in the WebMatrix Localhost IDE test server setting, or is the command line totally sufficient?

    Digging in. Thanks again!

    WebMatrix db creation blank mySQL

  • Re: Create MySQL database with WebMatrix website?

    Dec 02, 2010 11:44 AM|tzmedia|LINK

    Couple more questions, sorry... not sure what to fill in under the database connections.

    Need help with these 3?

    Connect to database:
    Name? Enter connection name?
    Server?
    Database?

     Nevermind, looks like I had some success then using Name for the database connection, looks like it can be anything and WebMatrix uses it to show in the left sidebar for the name of the database connection, in case there's more than one to keep track of.

    For server I used localhost, if I remember correctly.

    and Database was modxblank in this case.

    MODx has a bunch of other checkbox options for install, so I opened a topic over there in the forums to try to sort out which ones of those are necessary for a relatively clean install.

    Big thanks to Faith.

    MySQL database connection

  • Re: Create MySQL database with WebMatrix website?

    May 29, 2011 04:30 PM|haymanpl|LINK

    You should NOT have launched this product until it was ready

     There is NO easy solution to connect to an existing backup file of a WordPress site

    1. Logging in to server ... Success.
    2. Verifying database access & permission ... Success.
    3. Verifying no existing WP data ... Failed.
        Error: WordPress already exists in this database with this prefix.
    4. Overall mySQL test result ... Failed.

     

    This is the crap i have to put up with because you have a D grade program that's nowhere near finished

     

    And its been over a week and NO response from any one at MS