As noted when discussing MySQL's database configuration, the my.cnf file of MySQL can be a bit overwhelming. It is hard to know what to include in your MySQL configuration
file. MySQL on Ubuntu keeps its system-wide configuration file at
/etc/mysql/my.cnf. You can see the gist of MySQL's configuration file on the previous page in this series on MySQL. The following discussion is meant to interact with that summary so you can be informed about your choices when configuring MySQL.
[client]
All MySQL settings under this section will be sent to MySQL clients when they try to connect.
port: This is the port on which the MySQL server listens for a connection. Even if you are using the server locally and will not have anyone but you on your computer using it, you must have a port for the server. This is due to the innate networking characteristic of Ubuntu's Linux infrastructure. If you choose to change default port number (which may be necessary if there is a conflict with another service), you must ensure the change is also done in the debian.cnf file in the same directory.
socket: This indicates the socket file you want MySQL to use. This file is temporary and is recreated every time MySQL starts. To have two MySQL database servers on the same computer, you just have to give each a different port and socket reference.
[mysqld_safe]
The mysqld_safe setting is the optimal way to start the MySQL database server. When started with mysqld_safe, MySQL attempts to start using mysqld and pulls its configuration from the following sections of this configuration file: mysqld_safe, mysqld, and server.
socket: This is the location of the socket file to be used by the database server.
nice: This variable indicates the priority with which MySQL's commands should be executed by the system. The range is from the lowest priority of 20 to the highest priority of -20. The norm is 0.
[mysqld]
user: This is the user that MySQL should use on the local system. This is the username that will be registered in the logs and with whose permissions MySQL will function.
socket: This is the socket for the MySQL server. Obviously, this location and the location of the same name under [client] must be the same for things to work.
port: This is the port for the MySQL server. Again, there should be synchronicity between this listing and that in [client].
basedir: This is the base directory for MySQL's operations.
datadir: The datadir directive is where MySQL keeps the files of its databases.
tmpdir: This is MySQL's temporary directory and is used for temporary files.
skip-external-locking: External locking is used when you have multiple MySQL servers or database applications that access the same MySQL database files. This is not about applications that access data through the same instance of MySQL but is about separate processes that are operating independently. If you setup multiple MySQL servers with the same datadir, all MySQL servers will need to have external locking switched. Do this by commenting out this directive (i.e., put a hash symbol before it).
bind-address: The bind address is the IP address that MySQL should recognize as the host on which it runs. The default is 127.0.0.1, the IP address of the localhost.
key_buffer: This represents the largest size of key allowed in a database. If you don't understand what a key is, see the MySQL fundamentals page.
max_allowed_packet: This clarifies the maximum size of an allowed packet within the MySQL database.
thread_stack: This is the largest size allowed for all of the threads running at one time in the database process itself.
thread_cache_size: The size of the cache determines how much of information about MySQL threads are kept in memory so to make it more efficient.
myisam-recover: If you use the MyISAM database engine, do you want MySQL to support its recovery option?
query_cache_limit: This is the largest size of any cache entry. The query cache stores SELECT statements and their results.
query_cache_size: The MySQL database needs a minimum query cache size of 40k to work. If a query cache size of 16 MB is used, then MySQL will store a maximum of 16 queries of 1 MB in size.
log_error: This is where MySQL is to log information about any errors that occur.
expire_logs_days: This represents how many days the binary logs should be kept until being automatically removed by the system.
max_binlog_size: This represents the maximum allowable size of any MySQL binary log. If writing to the log would put it over that limit, MySQL will rotate the log so to keep the binary log under the limit set here.
[mysqldump]
The mysqldump utility is used for archiving or otherwise backing up a MySQL database. This section in my.cnf configures how mysqldump will operate when used to access this database.
quick: When quick is included, mysqldump will dump the relevant databases row-by-row instead of buffering them completely before writing.
quote-names: Inclusion of this directive causes mysqldump to place all database names and other identifiers in quotes.
max_allowed_packet: This is the maximum size of the buffer allowed between client and server. The default is 1 GB.
[isamchk]
The isamchk utility is used to check the consistency of a MySQL table and to repair or optimize one, as well.
key_buffer: The key buffer value indicates the maximum size a database key may be.
!includedir: This is how one includes configuration directories in MySQL's my.cnf file.
Knowing these basic configuration options of a MySQL database configuration file, you can adapt the service better to suit your needs. This is, however, only one part of a LAMP server. Additionally, you need to install Apache and use a scripting language like PHP or Python to control how content is processed.
A Brief History of Linux The Linux kernel is the basic programming foundation for the entire Ubuntu operating system. Here is how it started and why it is called GNU/Linux.
Ubuntu's African Roots Ubuntu comes from an African word that suggests humanity and community.
Ubuntu, Comparatively Speaking Ubuntu compares well against any operating system in use today, including Windows, Mac, and other Linux versions.
Get Ubuntu Linux: Download, Request, or Order Ubuntu Ubuntu can be downloaded or ordered and is available in a couple of versions: 6.06 (Dapper Drake) and 7.04 (Feisty Fawn). Which you use depends on the software you need. This page shows you from where you can download, request, or buy Ubuntu.
Ubuntu vs Windows Vista Ubuntu had many Windows Vista features almost a year before Microsoft released it. Here is how Ubuntu compares to Windows Vista.
Windows Vista vs Mac OS X Windows Vista looks curiously like Mac OS X. NY Times' David Pogue says there is no connection.
Resizing a Windows Installation Resizing a Windows installation is easy with the Ubuntu installer. Installing Ubuntu in parallel to a Windows installation is called 'dual booting' and is a good idea. Here is how to do it.
A Brief History of Ubuntu Ubuntu's history started with Debian GNU/Linux but has since outgrown it. Here is a brief look at Ubuntu's past and how things stand today.
Adding Ubuntu Repositories Adding Ubuntu repositories to download more Linux software is not very complicated. It is a simple matter of telling Ubuntu where to find more software.
Additional Ubuntu Repositories Ubuntu software is available in more repositories than the default Ubuntu installation gives you. Here is a listing of more Ubuntu repositories for your software needs.
How to Install Ubuntu Linux 7.04 (Feisty Fawn) Ubuntu Feisty was released in April 2007. It is the easiest Ubuntu to install yet. Here is how the installation of Ubuntu Feisty is different from 6.06 LTS.
Booting Windows Instead of Ubuntu by Default Grub boots Ubuntu by default. But if you want to make Windows your default operating system without losing Ubuntu, all you need do is change a number in Grub's configuration file. Here is how.
Dual Boot Ubuntu With Windows Dual booting Ubuntu with Windows or another operating system is not particularly difficult. This guide shows you how to dual boot Ubuntu and Windows.
Make Grub's Menu Visible At Startup Grub's menu is hidden by default. Making it visible at startup is a matter of editing grub's configuration file. Here is how.
A Primer for Installing Ubuntu Installing Ubuntu should be as easy as possible, and the best guides for this are provided here at Easy Ubuntu Linux. But all the online resources in the world do not help you offline. For this reason, we are providing this PDF primer to help you install Ubuntu.
Receiving E-mail Sending e-mail under Linux is easy. Here is how to receive email under Ubuntu Linux.
Sending E-mail On Ubuntu Sending e-mail under Linux is simple. Here is how to setup Evolution to send email under Ubuntu Linux.
Office Suites for Ubuntu Choosing an office suite for your Ubuntu installation is like choosing the first among equals. Here is a comparison of the best office suites available for Ubuntu Linux.
Upgrading Ubuntu Ubuntu upgrades are easy to affect. As usual with Ubuntu, you get to choose how to upgrade.
Receiving Email via IMAP Sending e-mail under Linux is easy. Here is how to receive email under Ubuntu Linux.
Image Handling With Ubuntu Ubuntu's image handling surpasses those of other operating systems. Whether you just need to look at your pictures or create first-rate graphics, Ubuntu offers a program to meet your needs.
Photo Editing With the GIMP Ubuntu comes with the GIMP already installed. Here is a brief tutorial on how to edit photos with the GIMP.
Photo Previewing and Slideshows With GQView GQView is an additional photo previewing program for Ubuntu. Here is a brief tutorial on how to preview and edit photos with GQView on Ubuntu.
Install Ubuntu Install Ubuntu with minimal fuss. Some choices in the installation process are better than others, and this section will help you to install Ubuntu with ease.
Configure Ubuntu The default Ubuntu configuration is good for most users. However, you will inevitably want to configure Ubuntu to suit your tastes better.
How to Use Ubuntu Once Ubuntu is setup, you may still wonder about how to use Ubuntu. This section will show you how to setup and use software such as email, office suites, and photo editing software.
Installing Apache on Ubuntu Apache is the main Ubuntu web server. It allows you to serve web pages from your computer. Here is how to use Ubuntu to serve web pages with Apache.
Configure Apache Web Server on Ubuntu Apache is a web server available for Ubuntu. With it you can serve web pages from a computer. Here is how to setup Apache as a web server on Ubuntu.
Apache Web Server Configuration on Ubuntu Apache on Ubuntu is a web server that enables you to serve web pages. How well those web pages are served depends on the configuration you use. Here is detailed information on the default configuration of the Apache web server on Ubuntu.
Installing PHP on Ubuntu PHP is one of the main languages
used in developing for the Web. It
allows you to create web pages
dynamically on Ubuntu.
Configuring PHP on Ubuntu PHP is a programming language
used with the Apache web server.
Configuring PHP well allows you to
serve web pages dynamically on
Ubuntu.
Configuring PHP on Ubuntu In-Depth PHP is one of the main languages
used in developing for the Web.
Here is an in-depth look at
configuring it on on Ubuntu.
Reading the php.ini File from Ubuntu PHP is one of the web's main languages for development. Understanding how to configure PHP
allows you to create web pages
dynamically on Apache.
The Easy Ubuntu Blog Ubuntu is not always easy. But Easy Ubuntu Linux helps make it that way. Keep it easy with the Easy Ubuntu blog.
Installing a LAMP Server on Ubuntu A LAMP server is one of the most pervasive types of servers on the Internet, but many people find installing LAMP servers difficult. Here is how to install a LAMP server on Ubuntu.
Installing Samba on Ubuntu Samba is the main Ubuntu file sharing server. It allows you to share files with others from your computer. Here is how to use Ubuntu to share files with Samba.
Configuring Samba on Ubuntu I Samba is a file sharing server for Ubuntu Linux. It allows filesharing with others from your computer. This guide shows how to configure Samba on Ubuntu.
Configuring Samba on Ubuntu II Samba is a file sharing server for Ubuntu Linux. It allows filesharing with others from your computer. This is the second page of a guide that shows how to configure Samba on Ubuntu.
Configuring Samba on Ubuntu III: [globals] Samba is a file sharing server for Ubuntu Linux. The [globals] header is part of the Samba configuration file. This guide shows how to configure the [globals] section of the Samba configuration on Ubuntu.
Configuring Samba on Ubuntu IV: [homes] Samba is a file sharing server for Ubuntu Linux. The [homes] header is part of the Samba configuration file. This guide shows how to configure the [homes] section of the Samba configuration on Ubuntu.
Configuring Samba on Ubuntu V: [printers] Samba also functions as a printer managing server for Ubuntu Linux. The [printers] header is part of the Samba configuration file. This guide shows how to configure the [printers] section of the Samba configuration.
Resizing a Windows Installation: A Caution Resizing a Windows installation is easy with the Ubuntu installer. Installing Ubuntu in parallel to a Windows installation is called 'dual booting' and is a good idea. Here is how to do it.
Installing Wine on Ubuntu Wine is an emulation layer for Ubuntu. It allows you to run Windows applications like native Ubuntu software. Here is how to use Wine to run Windows applications on Ubuntu.
Installing Business::Credit Card for Perl on Ubuntu Perl's Credit Card module is an effective way to check card numbers on Ubuntu. Here is how to install the Credit Card module on Ubuntu in the fastest and most painless way possible.
Credit Card Validation Before Processing Processing credit cards is a fundamental process when you do ecommerce on Apache. Here we walk through some of the more common options for credit card processing on Ubuntu.
Credit Card Processing Choices Processing credit cards is a fundamental process when you do ecommerce on Apache. Here we walk through some of the more common options for credit card processing on Ubuntu.
Apache Web Hosting Apache is the main web server provided by web hosting companies. Here are recommendations on which Apache web hosting company to use for your Apache web host.
Linux Notebooks Linux notebooks are not as rare as they once were. It is nonetheless possible to buy a notebook and find that you cannot install Linux on it. Here is a series of guides for how to install Linux on different notebooks.
Learn PHP in HTML - How To Embed PHP in HTML We usually learn PHP as a standalone language, but it can be used in a HTML page. Here is how to embed PHP in HTML for dynamic web pages.
PCI DSS - What is PCI DSS PCI DSS is one of the most important elements of e-commerce. Even if you run your own credit card processing business, you would be forgiven for wondering 'What is PCI DSS?'. This cryptic abbreviation is explained here.
Sudoers - Registering Users in the Sudoers File Sudoers are those users who can gain administrative access to the system. Their names are listed in the sudoers file. Here is how to be so registered if your username is not in the sudoers file.
Sign Up for Gmail Sign up for Gmail and get several benefits for free. Here is how to sign up for Gmail for free.
Email Solutions on Ubuntu Linux Email solution on Linux vary according to how much control and accessibility you want to have. Here we see what is available
for email solutions under Ubuntu Linux.
Install Ubuntu 10.04 (Lucid Lynx) Install Ubuntu 10.04 (Lucid Lynx) with minimal fuss. Some choices in the installation process are better than others, and this installation guide will help you to install Ubuntu 10.04 (Lucid Lynx) with ease.
OpenOffice Writer OpenOffice Writer is the wordprocessing application of the OpenOffice office suite of productivity applications. Here are the basics of using OpenOffice Writer.
Easy Ubuntu Manuals Manuals for all things Linux provided by Easy Ubuntu Linux
Ubuntu Reset Password To reset password in Ubuntu is used with root access and without. Here is how to reset password in Ubuntu.
Ubuntu Add User To add users in Ubuntu allows for a true multi-user system. Here is how to add user in Ubuntu.
Unless otherwise stated, all material contained on this website is
copyrighted to Easy Ubuntu Linux.com. All rights are reserved. All
content is provided AS IS without any warranty of any kind for any
purpose.
If you have a question or comment about Ubuntu or this site,
please send email to 'webmaster (at) easy-ubuntu-linux.com' (remove
single quotes and replace "@" for " (at) ").