optimize your mysql server

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Post Reply
User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

optimize your mysql server

Post by bad_brain »

the mysql server bears a lot of optimization potential, but especially for beginners the config can be a pain in the rear. I found a real nice script that helps a lot finding optimized settings for your mysql server, here's how to get/use it:

Code: Select all

#download it into /usr/bin so you can start it from #everywhere
cd /usr/bin
wget http://www.day32.com/MySQL/tuning-primer.sh

#give the proper permissions to run it
chmod 755 tuning-primer.sh
alright, done! you can run the script now from every location by typing tuning-primer.sh
keep your mysql password for the root user ready, if you don't want to enter it every time chose "yes" when it asks "Would you like me to create a ~/.my.cnf file for you?".

when running it you get a nice and colorful output, red color means there should/can be optimized something, the syntax for the optimized settings (if there is no default setting than simply have to be edited in /etc/mysql/my.cnf) can be googled easily.

for the proper calculation of memory usage "bc" have to be installed, should be part of the repositories for any package-based distro.

enjoy! :wink:
Last edited by bad_brain on 27 Jan 2009, 12:53, edited 1 time in total.

pseudo_opcode
cyber messiah
cyber messiah
Posts: 1201
Joined: 30 Apr 2006, 16:00
17
Location: 127.0.0.1

Post by pseudo_opcode »

nice man, especially now we have a subject in school, DBMS, everything related to database optimization comes handy... :)

Hex00010
forum buddy
forum buddy
Posts: 17
Joined: 22 Nov 2010, 23:43
13

Re: optimize your mysql server

Post by Hex00010 »

That is also good


You can also optimize MYSQL via the my.cnf file :)

Post Reply