免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1055 | 回复: 0
打印 上一主题 下一主题

MYSQL 教程:§12, 配置MYSQL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-25 10:34 |只看该作者 |倒序浏览

§12, 配置MYSQL
本章接第一章
       许多MYSQL程序有配置选项,也可以通过文件来配置.全局配置在/etc/my.cnf设置.另外还有一些可选的默认配置在/usr/local/mysql/support-files
§12.1, 配置MYSQL选项
程序的参数可以在命令行输入,也可以放在配置文件.这些程序有: mysql, mysqladmin, mysqld,
mysqld_safe, mysql.server, mysqldump, mysqlimport, mysqlshow, mysqlcheck,
myisamchk, and myisampack
在linux中, /etc/my.cnf配置全局的选项,用户目录下的.my.cnf配置自己的服务.

查看帮助:
./mysqld --verbose --help |less

比如一个实例:
[root@LS-SVR-17
bin]# ps afx | grep mysql
29202 pts/1   
S+     0:00          \_ grep mysql
31703 ?        S     
0:00 /bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql_data
--pid-file=/usr/local/mysql_data/LS-SVR-17.pid
31765 ?        Sl   
0:04  \_
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql
--datadir=/usr/local/mysql_data --user=mysql
--pid-file=/usr/local/mysql_data/LS-SVR-17.pid
--log-error=/usr/local/mysql_data/LS-SVR-17.err --socket=/tmp/mysql.sock
--port=3306

InnoDB 的配置选项和多安装配置以及国际化配置参见教材

查看帮助:mysqld
–help

§12.2, 小结
The MySQL
programs mysql, mysqladmin, mysqld, mysqld_safe, mysql.server, mysqldump,
mysqlimport, mysqlshow, mysqlcheck, myisamchk, and myisampack all support the
use of a common options file.

You can set
options on a global basis, on a server basis, on a user-by-user basis, or all
by of these.

The syntax of
the file begins with the name of the program in square brackets, followed by
options for that program. Comments start with #. Each option may be expressed
as option, option=value, or set-variable option=value.

You can obtain
a complete list of options to mysqld with mysqld --help.

You can run
multiple MySQL servers on the same physical machine as long as options are set
to avoid clashes. You must set up different ports, sockets, and log files for
each server.

You can use
the options file to set the default character set and collation for the server.
The character set is the set of symbols used. The collation is the sort order.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/21908/showart_483128.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP