Finalizing a MySQL database installation includes knowing what is in your MySQL configuration file. MySQL on Ubuntu keeps its system-wide configuration file at /etc/mysql/my.cnf. If you look at that file, you will see a plethora of comments that, while intended to be helpful, can easily confuse and leave one overwhelmed. Here we will look at the most basic MySQL configuration you can use.
When all of the comments are pulled out of MySQL's default my.cnf file, its contents read as follows:
[client]This is the most basic MySQL configuration. Some of the directives can be hard to understand. For details about what each line does, see the comments on this MySQL database configuration.
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[isamchk]
key_buffer = 16M
!includedir /etc/mysql/conf.d/
MySQL Tutorials:
Install MySQL | Basic MySQL Configuration | MySQL Configuration In-Depth |
Apache Tutorials:
Install Apache | Basic Configuration | Apache In-Depth |
Recommend Web Hosting | Customising Apache | PHP Hosting |