setting up MySQL database

Because there is the new option of using MySQL to store your Movable Type database, I wrote up a short tutorial for how to get MySQL ready for the conversion. This is particularly for people who are using CPanel (I’m using version 4) as their control panel on their server.

Get into your CPanel. (usually by going to http://yourdomain.com/cpanel)

Click Manage MySQL (from Databases box at the bottom of the screen) Scroll down to where it says
Db: _____________ [add]

I entered “mt” (without the quotes). This created me a database called love_mt - yours will add your username onto the front of mt.
Click Add.

Now scroll down to where it says Users.
I entered “kristine” and a password. This created me a user called love_kristine.
Click Add User.

Now scroll back up to where it has two drop down boxes with a button that says [Add User to Db]
Drop down the select boxes to select your database and username - mine shows love_mt and love_kristine.
Click Add User to Db.

Now your MySQL database is set up and ready to use for MT.
You should download your mt.cfg from your mt directory (see step 9 of upgrading instructions) and here’s what my additional lines look like:

ObjectDriver DBI::mysql
Database love_mt
DBUser love_kristine

You’ll also edit the mt-db-pass.cgi file and put ONLY your password in it - you don’t need the words database_password in the file. (I did that wrong the first few times in the beta and couldn’t figure out why it didn’t work :) )

27 Responses to “setting up MySQL database”

  1. kadyellebee Says:
    setting up MySQL database
    Since :christine: asked so nicely, I wrote up a tutorial on setting up the MySQL database to use MySQL for

  2. Ashley Says:

    Thanks, Kristine! It was easy to do, with your instructions.

  3. Maggie Says:

    Hi Kristine! I get a message saying “No tables found in database.” Do you have any idea what that is about?

  4. Katie Says:

    Thanks! I just had to do this last week, and was hoping I did it right. Wish I’d seen this then! At least I did manage to get without any help, but with lots of confusion.

  5. ***Dave Does the Blog Says:
    MT and MySQL
    If you’re upgrading to MT 2.2 and going with the MySQL conversion option (which I think you should, just on

  6. Jessy Says:

    Nice! Worked for me thanks ladies.

  7. Blah Blah Blog Says:
    Now That Wasn’t So Bad…
    I finished the upgrade indoors, it was a little too dark out there to follow upgrade instructions. After I came

  8. robyn Says:

    “Done copying data from Berkeley DB to MySQL! All went well.” Easy-pleasey thanks to your directions. THANK YOU!

  9. Shelagh Says:

    This might just be thr prompting I need to get off my bottom and switch to using MySQL! :)

  10. Electrin Says:

    *laughs* Love Kristine! That’s a good one! :)

  11. Martha Says:

    Thanks so much! Exactly perfectly what I needed. :)

  12. Rich Says:

    Tchaa. I spent *ages* wondering how to get this going (my web hosters have a 7 day question/response cycle time, which doesn’t make for very dynamic support conversations).

    Fixed in a finger click - thanks!

  13. Mariann Says:

    Does anyone know the set-up using Dreamhost’s interface? This is, of course, a pre-question, as I’m attempting to work through what I have to enable MySql. Wish me luck! :)

  14. kristine Says:

    I looked up dreamhosts’ site and found that they probably aren’t using cpanel like my host is. But I did find this: How do I add users to my database? and How do I add a new MySQL database? . I don’t see where you add a user to a database , but I bet if you do these things, the option is in the same place.
    Wishing you luck!!! :)

  15. Red Hair and Freckles Says:
    mySQL
    I reinstalled a fresh copy of Movabletype this afternoon, and decided to try using the mySQL way of doing it

  16. Maggie Says:

    does anyone know how phpwebhosting.com works :o)

  17. A Trip Inside Zaldor's World Says:
    Pretty Painless!
    I did it - I moved to MySQL - it was pretty painless. Now, does this mean I can delete

  18. Rayne Says:

    A link to this article needs to be in the resources for the MT support forum. So many people have problems setting up MT because they miss the simple step of adding the new user to the db. Of course if this was noted more clearly in the CPanel, no one would have any problems using mySQL period.

  19. jessica Says:

    hey kristine, so apparently i’m not using the cpanel because when i type in “mydomain.com/cpanel” i get a 404 file not found error from my server.

    everything seems to be setting up fine for my MT except for the database…..

    i’m installing on my own server via mac osx server software, but the database bit is kicking my butt right now, and since i dont use the cpanel (apparently), i’ll guess i’ll keep searching for the solution somewhere on the web….

  20. sam Says:

    So I follow your instructions.. uploaded the 2 edited files…is that it.. do I need to run anything.. or does it just start using MySQL now?

    How can I tell if it works?

    I just pasted my 3 lines of MySQL script into the top of mt.cfg.. is this right

    any advice appreciated.. thx

  21. Anonymous Says:

    WOW. I can’t thank you enough for this! It solved my problem, and was super easy to follow and execute! THANKS!! :D

  22. Dianne Says:

    Does anyone know where Dreamhost went? I can’t log-ina nd their site isn’t working!

    Or do I just need ALOT more coffee?

  23. Michael Froomkin Says:

    I got this email from them today:

    Attention all DreamHost customers,

    Happy Birthday To Us! Due to a problem renewing our dreamhost.com domain
    registration, it lapsed today.

    This means that until the root DNS servers update showing dreamhost.com as
    being renewed, all dreamhost.com subdomains will be down.

    We have already put up a working copy of the Web Panel at
    https://panel.dreamhost.net

    We also have a working email box for support. This is support@dreamhost.net

    Because DNS is a decentralized system, these problems will sporadically affect
    all of you, but sometimes in different ways.

    ALL CUSTOMER WEBSITES THAT ARE NOT SUBDOMAINS OF DREAMHOST.COM ARE
    UNAFFECTED.

    When trying to access your server using Telnet, FTP, or SSH, be sure you use
    yourdomain.com, NOT server.dreamhost.com (as it won’t work).

    For a brief period of time this evening, mail was bouncing for some people.
    This has been fixed (the MX records have been changed to use dreamhost.net).

    The root servers next update tomorrow at noon (eastern time). DNS servers often
    cache information, so it may take up to one day for some service providers to see our
    domain again.
    Complicating matters is Verisign’s recent decision to automatically resolve any
    non-existent (or expired) domains to an IP they control. This is why mail was
    bouncing (instead of deferring), and is why for some people dreamhost.com (and it’s subdomains) may seem to resolve to Verisign. As soon as dreamhost.com’s all sorted out tomorrow at noon this will stop.

    We will keep you updated as the situation progresses, and rest assured we are
    all drinking plenty of coffee.

    Again these are up and working!:

    https://panel.dreamhost.net
    support@dreamhost.net

    Happy DreamHost “Dude, Where’s My Domain?” Team!

  24. Di Says:

    THANKS! I haven’t gotten that yet!!!

  25. Anonymous Says:

    No, did not work!

    Loading initial data into system…

    An error occurred while loading data:
    Connection error: Access denied for user: ‘myname@localhost’ (Using password: YES)

  26. Patrick Says:

    Hi.. Your instructions are EXTREMELY helpful! THANKS! However.. CPanel doesn’t hold record of my database(s) correctly.. Any ideas?

  27. Disarranging Mine Says:
    mySQL setup
    Instead of going around and stabbing at databases in the dark, as I’ve been known to do, I figured it’s best to just read the instructions. Here’s a link for…