|
|
|
| Всем привет. Сервер ставил не я. Установлен под FreeBSD. Работает стабильно. Имею права рута.
Решил настроить следующие переменные (нужно везде прописать utf8 в session и global).
На сейчас имеем:
character_set_client = utf8 | latin1
character_set_connection = utf8 | latin1
character_set_database = latin1 | latin1
character_set_results = utf8 | latin1
character_set_server = latin1 | latin1
character_set_system = utf8 | utf8
collation_connection = utf8_general_ci | latin1_swedish_ci
collation_database = latin1_swedish_ci | latin1_swedish_ci
collation_server = latin1_swedish_ci | latin1_swedish_ci
|
Присоединяюсь к серверу программой HeidiSQL. Выставляю везде utf8. Местами не дает настроить, но я запросами добиваюсь нужного результата. И так вроде бы все настроено. После рестарта сервера, настройки сбиваются. Предположив, что сервер после старта берет настройки из my.cnf, полез в него. Лежит my.cnf по следующему пути - /opt/mysql/server-5.6/.
Открываем my.cnf и видим следующую картину:
!include /etc/mysql/my.cnf
!includedir /etc/mysql/conf.d/
|
Получается, my.cnf лежит по другому пути. Идем туда /etc/mysql/.
Открываем my.cnf и видим следующую картину:
# Copyright (c) 2007 MySQL AB, 2009, 2010 Sun Microsystems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Use default setting for mysqld processes
#!include default_mysqld.cnf
#!include default_client.cnf
[mysqld.1]
# Run the master.sh script before starting this process
#!run-master-sh
log-bin= master-bin
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
[mysqlbinlog]
disable-force-if-open
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
|
В общем какая-то херня. Как правильно прописать указанные выше параметры в my.cnf? | |
|
|
|
|
|
|
|
для: TetRiska
(19.03.2014 в 15:28)
| | в общем, методом тыка, понял всю ситуацию
файл my.cnf лежащий по пути /opt/mysql/server-5.6/ вообще не был задействован, т.к. инклуды не срабатывали
достаточно было прописать 1 строчку, которая повлияла на все настройки:
[mysqld]
character_set_server=utf8
|
| |
|
|
|