Http://blog.csdn.net/jspping/article/details/40400691?utm_source=tuicool&utm_medium=referral
******************************************************************************
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:
[Java]View PlainCopy
- # for advice The change settings
- # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
- # * * * Don't EDIT 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 = 4000M
- innodb_additional_mem_pool_size=60m
- Innodb_data_home_dir=
- Innodb_date_file_path=ibdata1:20m:autoextend
- Innodb_log_group_home_dir=/var/log/innodb_log
- innodb_log_files_in_group=2
- innodb_log_file_size=30m
- innodb_log_buffer_size=3m
- Innodb_doublewrite=on
- innodb_open_file=
- Innodb_file_per_table=on
- innodb_max_dirty_page_pct=
- back_log=
- interactive_timeout=3600
- key_buffer_size=10m
- max_allow_packet=40440
- max_connections=
- max_tmp_tables=
- query_cache_size=10m
- sor_buffer_size=10m
- Table_open_cache=
- # Remove Leading
- # to turn on a very important data integrity option:logging
- # Changes to the binary log between backups.
- #lob_bin
- Log_bin=on
- Log_bin_basename=/var/lib/mysql/mysqld-bin
- #
- # Remove Leading # To set options mainly useful for reporting servers.
- # The server defaults is faster for transactions and fast selects.
- # Adjust sizes as needed, experiment to find the optimal values.
- Join_buffer_size = 128M
- Sort_buffer_size = 2M
- Read_rnd_buffer_size = 2M
- Datadir=/var/lib/mysql
- Socket=/var/lib/mysql/mysql.sock
- Character_set_server=utf8
- #init_connect =' SET NAMES UTF8 '
- # Disabling Symbolic-links is recommended to prevent assorted security risks
- symbolic-links=0
- # Recommended in standard MySQL setup
- Sql_mode=no_engine_substitution,strict_trans_tables
- #general_log
- General_log=on
- General_log_file=/var/lib/mysql/localhost.log
- #slow_query_log
- Slow_query_log=on
- Slow_query_log_file=/var/lib/mysql/localhost-slow.log
- Slow_launch_time=2
- [Mysqld_safe]
- Log-error=/var/log/mysqld.log
- Pid-file=/var/run/mysqld/mysqld.pid
If the above file is configured, perform MySQL login, throw xxxx.line Such an exception, go to /usr/share/mysql below to copy a. cnf file header to replace the above MY.CNF header code, if you want to copy a to/ etc, named My.cnf, then put the above copy, version information and some details of the 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:
[Plain]View PlainCopy
- # for advice The change settings
- # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
- # * * * Don't EDIT 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 # number on line 7th of the configuration file above, can resolve 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:
[Plain]View PlainCopy
- 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 |
- +----------------------------------------+------------------------------------+
- 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)
[Plain]View PlainCopy
- 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 completely my own whole, a lot of tutorials are nonsense (Zhuan)