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

  • Matter update may finally take the tedium out of setting up your smart home
  • Cue: Apple will add AI search in mobile Safari, challenging Google
  • Apps like Kindle are already taking advantage of court-mandated iOS App Store changes
  • Spotify seizes the day after Apple is forced to allow external payments
  • Apple and Meta furious at EU over fines totaling €700 million

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

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

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