I read a lot about Linux without my.cnf blog, what is RMP install no my.cnf file Ah, and then what two methods Ah, I have no words, if you know will not check the information, you dare not take charge of the point? Tell me the details. Some say it is useful to copy a. cnf file from/usr/share/mysql to/etc? Profile data not to others, copy a yarn? Copy who will!
MY.CNF configuration file:
# for advice The change settings see# http://dev.mysql.com/doc/refman/5.6/en/ server-configuration-defaults.html# * * * does not EDIT the this FILE. It's a template which'll be copied to the# * * * default location during install, and would be replaced if you# * * * Upgrade To a newer version of MySQL. [Mysqld] #innodb # Remove Leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.innodb_buffer_pool_size = 4000minnodb_additional_mem_pool_size=60 Minnodb_data_home_dir=innodb_date_file_path=ibdata1:20m:autoextendinnodb_log_group_home_dir=/var/log/innodb_ Loginnodb_log_files_in_group=2innodb_log_file_size=30minnodb_log_buffer_size=3minnodb_doublewrite=oninnodb_ Open_file=2000innodb_file_per_table=oninnodb_max_dirty_page_pct=50back_log=80interactive_timeout=3600key_ Buffer_size=10mmax_allow_packet=40440max_connections=1000max_tmp_tables=60query_cache_size=10msor_buffer_size= 10mtable_open_cache=2000# Remove LeaDing # to turn in a very important data integrity option:logging# changes to the binary log between backups. #lob_binlog_b in=onlog_bin_basename=/var/lib/mysql/mysqld-bin## Remove Leading # To set options mainly useful for reporting servers.# Th E server defaults is faster for transactions and fast selects.# Adjust sizes as needed, experiment to find the optimal VA Lues.join_buffer_size = 128msort_buffer_size = 2mread_rnd_buffer_size = 2mdatadir=/var/lib/mysqlsocket=/var/lib/ mysql/mysql.sockcharacter_set_server=utf8#init_connect= ' Set NAMES UTF8 ' # Disabling symbolic-links is recommended to Prevent assorted security riskssymbolic-links=0# Recommended in standard MySQL setupsql_mode=no_engine_substitution, Strict_trans_tables#general_loggeneral_log=ongeneral_log_file=/var/lib/mysql/localhost.log#slow_query_logslow_ Query_log=onslow_query_log_file=/var/lib/mysql/localhost-slow.logslow_launch_time=2[mysqld_safe]log-error=/var /log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid
If the above file is configured well, perform MySQL login, throw xxxx.line Such an exception, go to
/usr/share/mysql Copy the header of the. cnf file below to replace the header code of the my.cnf above, if you want to copy one to/etc, name the MY.CNF, and then copy the above, the version information and some detailed file
Specific path configuration, and parameter configuration see your own installation situation
I replaced these sentences with the/USR/SHARE/MYSQL/MY-DEFAULT.CNF header file:
# for advice The change settings see# http://dev.mysql.com/doc/refman/5.6/en/ server-configuration-defaults.html# * * * does not EDIT the this FILE. It's a template which'll be copied to the# * * * default location during install, and would be replaced if you# * * * Upgrade To a newer version of MySQL. [Mysqld]
Then [MYSQLLD] below all is copy above, starting with the # of line 7th of the configuration file above, can solve similar
Fatal Error in defaults handling. Program aborted or XXXX line xxxx error problem, according to the specific situation of your server specific analysis, my is based on my configured as the benchmark
Once configured, MySQL can log in normally to view and start the log:
Mysql> Show variables like ' log_% '; +----------------------------------------+---------------------------------- --+| variable_name | Value |+----------------------------------------+------------------------------------+| Log_bin | OFF | | Log_bin_basename | || Log_bin_index | || log_bin_trust_function_creators | OFF | | log_bin_use_v1_row_events | OFF | | Log_error | /var/lib/mysql/ay140615022008z.err | | Log_output | FILE | | log_queries_not_using_indexes | OFF | | Log_slave_updates | OFF | | Log_throttle_queries_not_using_indexes | 0 | | log_warnings | 1 |+----------------------------------------+------------------------------------+11 rows In Set (0.01 sec) mysql> Show variables like ' log_bin '; +---------------+-------+| variable_name | Value |+---------------+-------+| Log_bin | OFF |+---------------+-------+1 row in Set (0.00 sec)
Mysql> select version (); +-----------+| Version () |+-----------+| 5.6.10 |+-----------+1 row in Set (0.02 sec)
Need to open can set their own, hope can help everyone, less go fruitless!
Linux does not have the My.cnf file solution, is entirely my own whole, a lot of tutorials are nonsense