Welcome to AC Web.
Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295

    Creating a portable MySQL


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.

    Ex vi animi

    Intro:
    I had this thread up for quite a while, listing two portable MySQL servers. (5.1 and 5.5.9) whilst this is nice, people whom make repacks can have different needs. (e.g: MySQL 5.6) The process of creating a portable MySQL is fairly easy. So lets find out how to do it.


    Step 1:
    First things first. Go to the MySQL download page (Or an alternative source.) and download the MySQL 32-bit installer you prefer. When it asks you to register, there's a skip button below.

    Step 2:
    Install the MySQL community server to your HDD (e.g: C:/Program Files/MySQL/MySQL 5.5.9/) once the service configuration starts (After the install finished.) be sure to uncheck both options shown below.

    Finish the configuration.

    Step 3:
    Here's the fun part. Configure and optimize your settings. You can find the settings in the MySQL folder. It differs between versions, but you have to edit the config file. (e.g: C:/Program Files/MySQL/MySQL 5.1/bin/my.cnf or C:/Program Files/MySQL/MySQL 5.6/my.ini) All settings are important, but here's the trick in making it portable. If you want to have the MySQL in a Server folder, change the following lines:
    Code:
    basedir=""
    datadir=""
    They'll be set to the installation folder, but they can be changed to:
    Code:
    basedir="../Server/mysql"
    datadir="../Server/mysql/data"
    The two dots before the /Server are important. Please do read through the rest of the configuration file. Everything is well documented and should be looked into.

    Step 4:
    Last but not least, you want people to be able to start your MySQL server. The most common way of doing this would be a .bat file. I'll include mine below, obviously, it should be edited, but I put the important part in bold:
    Code:
    @echo off
    COLOR F
    echo _______________________Jeutie's Blizzlike Repack________________________
    echo _______________________________MySQL 5.5.9______________________________
    echo.
    echo MySQL is currently running. Please only close this window for shutdown.
    echo Please disregard any InnoDB or Plugin notices. They are unnecessary.
    echo After your server is shut off, press CTRL C to shut down this service.
    mysql\bin\mysqld --defaults-file=mysql\bin\my.cnf --standalone --console
    
    if errorlevel 1 goto error
    goto finish
    
    :error
    echo.
    echo ERROR: the MySQL service could not be started.
    echo Please check if no other MySQL server is running.
    pause
    
    :finish
    The line in bold has to be partially edited, of course. In my example, my .bat file is inside the Server folder already, so I only have to tell it to access the /mysql subfolder. If you want to have it in your root, you might want to change that into:
    Code:
    server\mysql\bin\mysqld --defaults-file=server\mysql\bin\my.cnf --standalone --console
    Outro:
    As you see, this is fairly simple to do, however not many people know how to actually do it. Do mind that the MySQL server can be tweaked a lot, and the bat file can be customized as well. I'd suggest you do some research for that, but I hope this guide gets you started. Have fun!

    P.S: You can use unsupported MySQL libraries via Trinity Core. Though that is a little less noob-proof. I suggest consulting the Trinity Wiki for that. Also, most server folders also have an Apache server in them, it works in the same way as shown above, but requires a lot more edits, I'll let you figure that one out by yourself.

    This tutorial was brought to you by Jeutie.




    Need support? Post in this thread. Got another question? Ask here. Other inquiries? Mail me.
    Last edited by Jeutie; 03-29-2012 at 04:31 PM.

  2. #2
    Looks great...FIRST!

  3. #3
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295
    Quote Originally Posted by Czirz View Post
    Looks great...FIRST!
    Thank you, Czirz. It has been a while since I posted a tutorial, I was bored, ... go figure.

  4. #4
    Yet another great tutorial from Jeutie. +rep.

  5. #5
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295
    Quote Originally Posted by ace0195 View Post
    Yet another great tutorial from Jeutie. +rep.
    Thank you very much!

  6. #6
    ArcEmu Master

    Join Date
    Jan 2009
    Location
    https://www.facebook.com/Richard3Taylor
    Posts
    11,771
    i love you man (no homo) always making cool
    things for us.

    tree

  7. #7
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295
    Quote Originally Posted by treetree View Post
    i love you man (no homo) always making cool
    things for us.

    tree
    I love you too, Tree <3

  8. #8
    Jeutie, can you add my skype? ace0195

  9. #9
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295
    Quote Originally Posted by ace0195 View Post
    Jeutie, can you add my skype? ace0195
    I refuse to use Skype, sorry. E-mail me, much easier.

  10. #10
    AintNobodyGotTimeFoDat

    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    1,842
    Great

  11. #11
    Quote Originally Posted by Jeutie View Post
    Thank you, Czirz. It has been a while since I posted a tutorial, I was bored, ... go figure.
    Yeah, it is epic though.

  12. #12
    Very useful ^^ Nice Jeutie

  13. #13
    Ghost of the Past

    Join Date
    Jul 2010
    Location
    Belgium http://jordythery.be
    Posts
    5,295
    Quote Originally Posted by DeadGit View Post
    Great
    Thank you.
    Quote Originally Posted by Czirz View Post
    Yeah, it is epic though.
    Thank you.
    Quote Originally Posted by aK47Sigh View Post
    Very useful ^^ Nice Jeutie
    Thank you.

  14. #14
    And once again Jeutie shows why he is the boss :>
    Awesome work +rep
    Last edited by Emil9898; 12-28-2011 at 01:50 PM.

  15. #15

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Y U SO PRO?!?!

    Nice mate thanks for share. +rep

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •