MySQL Tutorial
MySQL Installation and Configuration
MySQL Database Operations
Database Design
MySQL Data Types
MySQL Storage Engines
MySQL Basic Operations of Tables
MySQL Constraints
MySQL Operators
MySQL Function
MySQL Manipulate Table Data
MySQL View
MySQL Indexes
MySQL Stored Procedure
MySQL Trigger
MySQL Transactions
MySQL Character Set
MySQL User Management
MySQL Database Backup and Recovery
MySQL Log
MySQL Performance Optimization
[client] port=3306 socket=/var/run/mysql/mysql.sock [mysqldump] quick max_allowed_packet = 16MThe above parameters will be read by the MySQL client application. The parameter descriptions are as follows:
Note: Only client applications shipped with MySQL are guaranteed to read this content. If you want your MySQL application to get these values, you need to specify these options when the MySQL client library is initialized.
[mysqld] user = mysql basedir = /usr/local/mysql datadir = /mydata/mysql/data port=3306 server-id = 1 socket=/var/run/mysql/mysql.sockThe above parameters are described as follows:
character-set-server = utf8mb4 collation-server = utf8mb4_general_ci init_connect='SET NAMES utf8mb4' lower_case_table_names = 1 key_buffer_size=16M max_allowed_packet=8M no-auto-rehash sql_mode=TRADITIONAL
Edit my.cnf for MySQL Configuration:
my.cnf
file using a text editor to adjust MySQL server settings.sudo nano /etc/mysql/my.cnfUse your preferred text editor instead of
nano
if needed.Changing Buffer Settings in my.cnf:
innodb_buffer_pool_size
to optimize MySQL's use of memory.my.cnf
and set values, e.g.:innodb_buffer_pool_size = 256M
Reload my.cnf Without Restarting MySQL:
sudo systemctl reload mysqlUse the appropriate command based on your system (
systemctl
, service
, or systemctl restart mysqld
).