我看过好多关于Linux下没有my.cnf的博客,都是什么rmp安装没有my.cnf文件啊,然后什么两个方法啊,我就无语了,大家要是知道就不会查资料了,你们敢不敢负责点?说详细点?有的说从 /usr/share/mysql 里复制一个.cnf文件到 /etc 下,有用吗?配置文件资料不
我看过好多关于Linux下没有my.cnf的博客,都是什么rmp安装没有my.cnf文件啊,然后什么两个方法啊,我就无语了,大家要是知道就不会查资料了,你们敢不敢负责点?说详细点?有的说从 /usr/share/mysql 里复制一个.cnf文件到 /etc 下,有用吗?配置文件资料不给别人,复制个毛线?复制谁都会!
my.cnf 配置文件:
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will 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 total 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=2000 innodb_file_per_table=ON innodb_max_dirty_page_pct=50 back_log=80 interactive_timeout=3600 key_buffer_size=10M max_allow_packet=40440 max_connections=1000 max_tmp_tables=60 query_cache_size=10M sor_buffer_size=10M table_open_cache=2000 # 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 are 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如果上述文件配置好后,执行mysql登录,抛出xxxx.line 这样的异常,就去/usr/share/mysql 下面复制一个.cnf文件的头部替换掉上述my.cnf的头部代码,前提是要copy一个到/etc下,命名my.cnf,再把上面的copy,版本信息和一些详细文件的
具体路径配置,和参数配置看你自己的安装情况
我替换的是/usr/share/mysql/my-default.cnf 头文件的这几句:
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld]然后[mysqlld]以下的全部是copy上面的,从上面配置文件的第7行的#号开始,可以解决类似Fatal error in defaults handling. Program aborted 或者xxxx line xxxx 错误的问题,根据你服务器的具体情况具体分析,我的是以我配置的为基准的
配置完之后,mysql可以正常登录,查看和启动日志:
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)需要开启的可以自己设置,希望可以帮到大家,少走歪路!

linux设备节点是应用程序和设备驱动程序沟通的一个桥梁;设备节点被创建在“/dev”,是连接内核与用户层的枢纽,相当于硬盘的inode一样的东西,记录了硬件设备的位置和信息。设备节点使用户可以与内核进行硬件的沟通,读写设备以及其他的操作。

区别:1、open是UNIX系统调用函数,而fopen是ANSIC标准中的C语言库函数;2、open的移植性没fopen好;3、fopen只能操纵普通正规文件,而open可以操作普通文件、网络套接字等;4、open无缓冲,fopen有缓冲。

端口映射又称端口转发,是指将外部主机的IP地址的端口映射到Intranet中的一台计算机,当用户访问外网IP的这个端口时,服务器自动将请求映射到对应局域网内部的机器上;可以通过使用动态或固定的公共网络IP路由ADSL宽带路由器来实现。

在linux中,交叉编译是指在一个平台上生成另一个平台上的可执行代码,即编译源代码的平台和执行源代码编译后程序的平台是两个不同的平台。使用交叉编译的原因:1、目标系统没有能力在其上进行本地编译;2、有能力进行源代码编译的平台与目标平台不同。

在linux中,eof是自定义终止符,是“END Of File”的缩写;因为是自定义的终止符,所以eof就不是固定的,可以随意的设置别名,linux中按“ctrl+d”就代表eof,eof一般会配合cat命令用于多行文本输出,指文件末尾。

在linux中,可以利用“rpm -qa pcre”命令判断pcre是否安装;rpm命令专门用于管理各项套件,使用该命令后,若结果中出现pcre的版本信息,则表示pcre已经安装,若没有出现版本信息,则表示没有安装pcre。

linux查询mac地址的方法:1、打开系统,在桌面中点击鼠标右键,选择“打开终端”;2、在终端中,执行“ifconfig”命令,查看输出结果,在输出信息第四行中紧跟“ether”单词后的字符串就是mac地址。

在linux中,rpc是远程过程调用的意思,是Reomote Procedure Call的缩写,特指一种隐藏了过程调用时实际通信细节的IPC方法;linux中通过RPC可以充分利用非共享内存的多处理器环境,提高系统资源的利用率。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version
SublimeText3 Linux latest version

Notepad++7.3.1
Easy-to-use and free code editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1
Powerful PHP integrated development environment
