Mysql Cominity Server 5.7.11にてmy.cnfの設定をしています。
・max_connections = 500
・文字コード:UTF8
・DBファイルシステム領域について(1000M)自動作成をする
・log_timestamps = 'system'
・lower_case_table_names = 2
事をしたいと思います。my.cnfを下記のように設定しました。
ログ時刻は現在の時刻になっているみたいなのですが、最初の1行だけ時刻がずれているのは
何故でしょうか?デーモンユーザで起動しているのでしょうか?
lower_case_table_names = 2にしてもmysqlに反映されません。記述が間違っているのでしょうか?
また、起動ログで注意、エラーが多い気がするのですが、問題ないでしょうか?
必要のない記述があれば教えて下さい。
my.cnf
1# For advice on how to change settings please see 2# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html 3[mysqld] 4# 5# Remove leading # and set to the amount of RAM for the most important data 6# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. 7# innodb_buffer_pool_size = 128M 8# 9# Remove leading # to turn on a very important data integrity option: logging 10# changes to the binary log between backups. 11# log_bin 12# 13# Remove leading # to set options mainly useful for reporting servers. 14# The server defaults are faster for transactions and fast SELECTs. 15# Adjust sizes as needed, experiment to find the optimal values. 16# join_buffer_size = 128M 17# sort_buffer_size = 2M 18# read_rnd_buffer_size = 2M 19log_timestamps = 'system' 20lower_case_table_names = 2 21datadir=/var/lib/mysql 22socket=/var/lib/mysql/mysql.sock 23# Disabling symbolic-links is recommended to prevent assorted security risks 24symbolic-links=0 25character-set-server = utf8 26skip-character-set-client-handshake 27# -------------------------------------------------- 28# Network 29# -------------------------------------------------- 30max_connections = 500 31# -------------------------------------------------- 32# Logging 33# -------------------------------------------------- 34general_log=1 35general_log_file=/var/log/mysql_query.log 36# -------------------------------------------------- 37# Cache & Memory 38# -------------------------------------------------- 39# Global 40thread_cache_size = 30 41table_open_cache = 400 42query_cache_size = 16M 43query_cache_limit = 1M 44# Global, Session 45max_heap_table_size = 16M 46tmp_table_size = 16M 47sort_buffer_size = 2M 48read_buffer_size = 131072 49join_buffer_size = 131072 50read_rnd_buffer_size = 262144 51# -------------------------------------------------------------------- 52# InnoDB behavior 53# -------------------------------------------------------------------- 54# Global 55innodb_file_format = Barracuda 56innodb_write_io_threads = 4 57innodb_read_io_threads = 4 58innodb_stats_on_metadata = 1 59innodb_max_dirty_pages_pct = 90 60innodb_adaptive_hash_index = 1 61innodb_adaptive_flushing = 1 62innodb_strict_mode = 1 63innodb_io_capacity = 200 64innodb_autoinc_lock_mode = 1 65innodb_change_buffering = inserts 66innodb_old_blocks_time = 500 67# -------------------------------------------------------------------- 68# InnoDB base 69# -------------------------------------------------------------------- 70# Global 71innodb_buffer_pool_size = 256M 72innodb_data_home_dir = /var/lib/mysql 73innodb_data_file_path = ibdata1:1000M:autoextend 74innodb_file_per_table = 1 75innodb_autoextend_increment = 64M 76innodb_log_group_home_dir = /var/lib/mysql 77innodb_fast_shutdown = 0 78innodb_log_file_size = 64M 79innodb_log_files_in_group = 2 80innodb_log_buffer_size = 8M 81#innodb_additional_mem_pool_size = 8M 82innodb_thread_concurrency = 8 83innodb_flush_log_at_trx_commit = 1 84innodb_force_recovery = 0 85innodb_doublewrite = 1 86innodb_sync_spin_loops = 20 87innodb_thread_sleep_delay = 1000 88innodb_commit_concurrency = 0 89innodb_concurrency_tickets = 500 90# Global, Session 91innodb_support_xa = FALSE 92innodb_lock_wait_timeout = 50 93innodb_table_locks = 1 94[client] 95default-character-set = utf8 96[mysqldump] 97default-character-set = utf8 98[mysql] 99default-character-set = utf8 100[mysqld_safe] 101log-error=/var/log/mysqld.log 102pid-file=/var/run/mysqld/mysqld.pid
-----------------/var/log/mysqld.log-------------------
2016-03-08T08:54:41.930740Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2016-03-08T17:54:42.139845+09:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-03-08T17:54:42.140663+09:00 0 [Note] /usr/sbin/mysqld (mysqld 5.7.11-log) starting as process 21803 ... 2016-03-08T17:54:42.146232+09:00 0 [Warning] option 'innodb-autoextend-increment': unsigned value 67108864 adjusted to 1000 2016-03-08T17:54:42.146718+09:00 0 [Warning] InnoDB: Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed. 2016-03-08T17:54:42.146740+09:00 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html 2016-03-08T17:54:42.146833+09:00 0 [Note] InnoDB: PUNCH HOLE support available 2016-03-08T17:54:42.146867+09:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-03-08T17:54:42.146880+09:00 0 [Note] InnoDB: Uses event mutexes 2016-03-08T17:54:42.146890+09:00 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier 2016-03-08T17:54:42.146900+09:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-03-08T17:54:42.146912+09:00 0 [Note] InnoDB: Using Linux native AIO 2016-03-08T17:54:42.147453+09:00 0 [Note] InnoDB: Number of pools: 1 2016-03-08T17:54:42.147610+09:00 0 [Note] InnoDB: Not using CPU crc32 instructions 2016-03-08T17:54:42.157075+09:00 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2016-03-08T17:54:42.180181+09:00 0 [Note] InnoDB: Completed initialization of buffer pool 2016-03-08T17:54:42.184575+09:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2016-03-08T17:54:42.197089+09:00 0 [Note] InnoDB: Highest supported file format is Barracuda. 2016-03-08T17:54:42.223241+09:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2016-03-08T17:54:42.223353+09:00 0 [Note] InnoDB: Setting file '/var/lib/mysql/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2016-03-08T17:54:42.364921+09:00 0 [Note] InnoDB: File '/var/lib/mysql/ibtmp1' size is now 12 MB. 2016-03-08T17:54:42.366681+09:00 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2016-03-08T17:54:42.366707+09:00 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2016-03-08T17:54:42.368574+09:00 0 [Note] InnoDB: Waiting for purge to start 2016-03-08T17:54:42.418823+09:00 0 [Note] InnoDB: 5.7.11 started; log sequence number 1209999 2016-03-08T17:54:42.420939+09:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2016-03-08T17:54:42.421367+09:00 0 [Note] Plugin 'FEDERATED' is disabled. 2016-03-08T17:54:42.421368+09:00 0 [Note] InnoDB: Buffer pool(s) load completed at 160308 17:54:42 2016-03-08T17:54:42.421969+09:00 0 [Warning] InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue. mysqld: Table 'mysql.plugin' doesn't exist 2016-03-08T17:54:42.422038+09:00 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. mysqld: File '/var/log/mysql_query.log' not found (Errcode: 13 - Permission denied) 2016-03-08T17:54:42.422293+09:00 0 [ERROR] Could not use /var/log/mysql_query.log for logging (error 13 - Permission denied). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL GENERAL_LOG=ON" or restart the MySQL server. 2016-03-08T17:54:42.423054+09:00 0 [Warning] InnoDB: Cannot open table mysql/gtid_executed from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue. mysqld: Table 'mysql.gtid_executed' doesn't exist 2016-03-08T17:54:42.423118+09:00 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2016-03-08T17:54:42.423163+09:00 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them. 2016-03-08T17:54:42.423544+09:00 0 [Warning] CA certificate ca.pem is self signed. 2016-03-08T17:54:42.426320+09:00 0 [Note] Server hostname (bind-address): '*'; port: 3306 2016-03-08T17:54:42.427687+09:00 0 [Note] IPv6 is not available. 2016-03-08T17:54:42.427748+09:00 0 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 2016-03-08T17:54:42.427769+09:00 0 [Note] Server socket created on IP: '0.0.0.0'. 2016-03-08T17:54:42.431671+09:00 0 [Warning] InnoDB: Cannot open table mysql/server_cost from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue. 2016-03-08T17:54:42.431711+09:00 0 [Warning] Failed to open optimizer cost constant tables 2016-03-08T17:54:42.432742+09:00 0 [Warning] InnoDB: Cannot open table mysql/time_zone_leap_second from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
-----------mysqld.log----
以上、ご教授をお願い致します。
