User Tag List

Results 1 to 4 of 4

Thread: How to install MySQL Server correctly

  1. #1
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,401
    XP
    3,450,055
    Level
    378
    Thanks
    892
    Thanked 1,860 Times in 1,121 Posts

    How to install MySQL Server correctly

    Hello, in this tutorial we will be going through the installation process of MySQL Server. There's been a lot of members receiving MySQL linker errors when compiling, let's hope we can resolve those.

    Note: This guide can be used for installing 64 bit or 32 bit essentials. Whatever you are trying to compile in.

    Required Programs




    Before you continue


    Make sure:
    • You aren't installing another program
    • Make sure in CMake your MySQL path to the include and libs folder is correct


    Not recommended:
    • It is not recommended to select "Full" install and go through with it unless you're compiling in 64-bit. By default the MySQL installer chooses MySQL Server x64.


    I'm getting errors:
    • fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory: The first thing you should do is rerun CMake and in Visual Studio -> Clean Solution -> Rebuild Solution. If this error still shows it might be because it cannot find the needed MySQL directories/other. This can be solved by going into CMake (make sure you already generated/configured), click the "Advanced" option if not done, scroll down until you see "MYSQL_EXECUTABLE", "MYSQL_INCLUDE_DIR", "MYSQL_LIBRARY" and make sure the paths are correct.
    • fatal error: binary_log_types.h: No such file or directory: This is MySQL developers fault since they haven't added binary_log_funcs.h and binary_log_types.h to the community install package. You can solve this by going to https://github.com/mysql/mysql-serve...events/export/ and saving those two files on your desktop as header (.h) files. Afterwards, put them in your MySQL Server 5.7\include\ folder, typically found at "C:\Program Files\MySQL\MySQL Server 5.7\include". You can view this stackoverflow question if you aren't understanding.


    Fresh Install


    After it is done loading and you accept the terms you should be at "Choosing a Setup Type". If you are at this menu, the ideal thing is to select "Custom"; however, to make this easy on us both we're going to select "Full" then click Next. Don't worry, we aren't going to go through with this, this is just to auto list all the programs we can choose to install.

    If you're at the "Check Requirements" menu after selecting "Full" option, you can now press Back.



    Now select "Custom" option and then click Next.



    After doing so you should now see all the items it wants to install on the right in the "Select Products and Features" menu. However, don't get carried away. We're mainly looking at MySQL Server bit size it wants to install:


    Or choose 64 bit (X64) instead. Whatever you are compiling in.

    As I've mentioned before: By default it will automatically be MySQL Server x64.

    To edit this, you should see "Available Products" on the side where we can add and remove products to install. First, we need to remove MySQL Server x64 by selecting MySQL Server 5.x.xx - X64 and hitting the remove arrow "<" button:


    Or choose 64 bit (X64) instead. Whatever you are compiling in.

    Once you've done that in the "Available Products" list box we can hit the "+" next to MySql Servers -> MySQL Server -> MySQL Server 5.X to select the X86 (32-bit) MySQL Server. Once you've found "MySQL Server 5.x.xx - X86", select it and hit the add arrow ">" button to add the product for installation:


    Or choose 64 bit (X64) instead. Whatever you are compiling in.


    After you're done with all of that, click "Next":

    If you're at the "Check Requirements" menu, you can go back and remove the products it shows you don't have (mainly because MySQL for those programs will be pointless since you don't have them installed). Don't worry, you can install the MySQL products for those programs later if needed.


    If everything checks out to be correct, at the "Installation" menu press "Execute":



    After everything installs, the rest is all you! Hope you enjoyed this small guide!

    Already Installed


    This secondary guide is going to help you if you already have MySQL installed.

    Start the MySQL installer. After starting the installer you should see a list of all the products your previous MySQL installed.

    If "MySQL Server 5.x.xx - X64" option shows in the list:



    And you aren't compiling in 64-bit, you can easily remove it and install the X86 (32-bit) version.

    1. Click "Remove ..." on the side
    2. Checkmark "MySQL Server 5.x.xx"
    3. Press Execute
    4. Once it stops uninstalling click Next and at the "Remove Complete" menu uncheck "Yes, reboot when done" and click "Finish"
    5. Click "Add ..." once you're back at the MySQL installer product view menu

    Once clicking "Add ..." you should be at the "Select Product and Features" menu. If you are do the following:

    In the "Available Products" list box we can hit the "+" next to MySql Servers -> MySQL Server -> MySQL Server 5.X to select the X86 (32-bit) MySQL Server. Once you've found "MySQL Server 5.x.xx - X86", select it and hit the add arrow ">" button to add the product for installation:


    Or choose 64 bit (X64) instead. Whatever you are compiling in.

    Now click Next -> Execute -> Once it is done click Next -> And the rest is all you!

    If you have any questions or need help, post here or create a new support thread (creating a support thread is more recommended). Don't forget to check back at the top of the thread for error help, etc.

  2. The Following 5 Users Say Thank You to Tommy For This Useful Post:


  3. #2
    Exalted Member <span style='color: #000000'><span class='glow_4169E1'>Skrbx</span></span>'s Avatar
    Join Date
    Aug 2013
    Posts
    506
    XP
    2,646,164
    Level
    311
    Thanks
    87
    Thanked 72 Times in 63 Posts
    Great! It is very useful for newbies!
    Achievements:
    Got a Sticky! Shopper 1 year registered Member Bad Seed Level XL Level C
    Awards:
    Raffle Winner

  4. #3
    Enthusiast hashimoff's Avatar
    Join Date
    Oct 2014
    Posts
    30
    XP
    1,682
    Level
    11
    Thanks
    10
    Thanked 2 Times in 1 Post
    Perfect)) Thanks

  5. #4
    Original Poster
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,401
    XP
    3,450,055
    Level
    378
    Thanks
    892
    Thanked 1,860 Times in 1,121 Posts
    Updated tutorial.

  6. The Following 2 Users Say Thank You to Tommy For This Useful Post:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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