Ubuntu 16.04 MariaDb 无示例配置
Ubuntu 16.04 MariaDb no sample configurations
我有一个 Ubuntu 16.04 服务器 (VPS),我在上面安装了 MariaDb 10.1 (did it like the doc said). I would like to configure the database server, so innodb can use 2-4GB memory, so I tried to find the sample my.cnf
's in /usr/share/mysql/
but not a single one is there (only these)。在哪里可以找到示例配置以及如何使它们成为实际配置?我读到 /etc/mysql/mysql.conf.d/
目录应该包含一个 mysqld.cnf
,但对我来说只有这些文件:
50-client.cnf 50-mysql-clients.cnf 50-mysqld_safe.cnf 50-server.cnf 50-server.cnf.backup
哪个活跃?我的猜测是 none.
我不需要任何特别的东西,这就是为什么我只想实现 my-huge.cnf
并完成。
你有多少内存?
服务器 my.cnf
最重要的设置是 innodb_buffer_pool_size
。如果您有超过 4GB 的 RAM,请将其设置为可用 RAM 的 70% 左右。如果您的内存少于 4GB,请使用较小的百分比。交换对性能非常不利。
您需要将其中一份复制到 /etc/my.cnf
。如果没有该文件,您(可能)除了内置默认值外没有其他配置。
给我们看一下内容,以便进一步批评。
我有一个 Ubuntu 16.04 服务器 (VPS),我在上面安装了 MariaDb 10.1 (did it like the doc said). I would like to configure the database server, so innodb can use 2-4GB memory, so I tried to find the sample my.cnf
's in /usr/share/mysql/
but not a single one is there (only these)。在哪里可以找到示例配置以及如何使它们成为实际配置?我读到 /etc/mysql/mysql.conf.d/
目录应该包含一个 mysqld.cnf
,但对我来说只有这些文件:
50-client.cnf 50-mysql-clients.cnf 50-mysqld_safe.cnf 50-server.cnf 50-server.cnf.backup
哪个活跃?我的猜测是 none.
我不需要任何特别的东西,这就是为什么我只想实现 my-huge.cnf
并完成。
你有多少内存?
服务器 my.cnf
最重要的设置是 innodb_buffer_pool_size
。如果您有超过 4GB 的 RAM,请将其设置为可用 RAM 的 70% 左右。如果您的内存少于 4GB,请使用较小的百分比。交换对性能非常不利。
您需要将其中一份复制到 /etc/my.cnf
。如果没有该文件,您(可能)除了内置默认值外没有其他配置。
给我们看一下内容,以便进一步批评。