Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Optimising MySQL on OS X 10.8 Mountain Lion with mysqltuner.pl

December 26, 2011 5 Comments

Once you have installed MySQL onto OS X / OS X server, MySQL will basically run OK under a light load. You can see what tweaks you might need to make with a fine tuning MySQL script aptly named mysqltuner.pl, this script can make suggestions that you need to load into your MySQL configuration file.

my.cnf

To change some variables to the database server you have to edit configuration file ‘my.cnf’ which you will notice that there isn’t one filed in the root directory /etc.  This is the default behaviour as a part of the OS X installation and MySQL runs Ok without it.

The actual MySQL data is stored at:

 /usr/local/mysql/data

Some sample my.cnf configuration files for MySQL 5.5.X are found at :

 /usr/local/mysql/support-files/

Named my-small.cnf my-medium.cnf my-large.cnfand my-huge.cnf files – if you want your own my.cnf for mysql file that you need to edit, pick the one that suits your environment and make a copy of it into /etc

 sudo cp /usr/local/mysql/support-files/my-small.cnf /etc/my.cnf

If you have MySQL 5.6.X ,the default my.cnf is found at:

 /usr/local/mysql/my.cnf

Copy that to /etc

sudo cp /usr/local/mysql/my.cnf /etc/my.cnf

Make your adjustments to it and restart MySQL

 sudo /usr/local/mysql/support-files/mysql.server restart

Run the mysql tuner script

To make recommended adjustments let the database run for over 24 hrs before running the script.

Then download and run mysqltuner.pl script:

 sudo -s
 cd /usr/bin/
 sudo curl -O https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
 sudo chmod 755 mysqltuner.pl

Run the Script and Look for the Recommendations

mysqltuner.pl

The important output returned to you is in the ‘Variables to Adjust’ section…

mysql-optimisation-osx

mysql-optimisation-osx

Take these recommendations and add/adjust them into your /etc/my.cnf file

Restart MySQL for these settings to take affect

 sudo /usr/local/mysql/support-files/mysql.server restart

Cats: macOS, Open Source, Tech

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Apple takes Epic fight over app store fees to the Supreme Court
  • Russian citizens told "switch to Android" after Apple blocks key Russian apps
  • Apple ratchets up prices, blames the cost of memory
  • Apple patches high-severity eavesdropping vulnerability in Beats Studio Buds
  • 20 years of Intel Macs: Why Apple switched, and why it switched again

RSS mac surfer

  • iOS 27 Beta Code Hints at 'AirPods Ultra' Cameras
  • Apple Watch Series 12 Rumored to Add Health Sensor in Band
  • Apple Reportedly Suspends Camera-Equipped AirPods Pro Development
  • Apple Says Public YouTube Videos Are Fair Game in AI Lawsuit Defense
  • Jon Prosser Denies Apple's Trade-Secret Claims, Blames Co-Defendant

Donate

Copyright © 2026· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2026 · gee on Genesis Framework · WordPress · Log in