Linux 编译安装 MYSQL 5.1 与 Innodb
Linux 编译安装 MYSQL 5.1 与 Innodb
编译mysql5
代码:
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \
--with-extra-charsets=all \
--with-charset=utf8 \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--with-plugins=all \
--with-pthread \
--enable-thread-safe-client
groupadd mysql
useradd -g mysql mysql
cp support-files/my-medium.cnf /etc/my.cnf
在my.cnf里增加user=mysql
代码:
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root . ; chown -R mysql data ;chgrp -R mysql .
bin/mysqld_safe --user=mysql &
mysqladmin -uroot password 'new-password'
启动mysql:
代码:
/usr/local/mysql/bin/mysqld_safe &
关闭mysql:
代码:
/usr/local/mysql/bin/mysqladmin shutdown
代码:
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
可以使用server mysqld restart启动
debian下安装mysql的注意事项--innodb
如果从源代码编译安装mysql,缺省安装时,是没有innodb引擎的.所以,在configure的时候,要加入--with- plugins=all(或者max),这样才会支持innodb.在mysql里可以执行show engines命令来查看当前的mysql服务器所支持的存储引擎.
http://www.mysqlperformanceblog.com/...iled-mysql-51/
多线程支持方面只要注意选择--with-pthread和--enable-thread-safe-client选项就可以了。第一项可以指明使用 posix线程(unix的编译方式可能会有些不一样,因为unix的内核线程工作方式与linux线程工作方式有比较大的区别,尤其freebsd)。
my-small.cnf 最小配置安装,内存<=64M,数据数量最少
my-large.cnf 内存=512M
my-medium.cnf 32M<内存<64M,或者内存有128M,但是数据库与web服务器公用内存
my-huge.cnf 1G<内存<2G,服务器主要运行mysql
my-innodb-heavy-4G.cnf 最大配置安装,内存至少4G
代码:
delete from mysql.user where User='';
delete from mysql.user where Host='127.0.0.1';
delete from mysql.user where Host='localhost.localdomain';
update user set Host='%';
mysql 操作:
查看mysq
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
转贴自:http://alexanderlaw.blog.hexun.com/8968960_d.html
七、 target 匹配
7.1 ipt_target和ipt_entry_target结构 ip_tables.h
ipt_target和ipt_match结构类似:
struct ipt_target
{
struct list_head list;
& ......
Linux环境进程间通信(五):
共享内存(上)
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" wid ......
首页
讲述:我与51CTO不得不说的故事
博客互动专题 之 2009,痛并快乐着的IT人
博主的更多文章>>
linux diff 命令详解
2009-02-13 14:01:37
标签:linux
diff
命令
[推送到技术圈
]
功能说明:比较文件的差异。
语
法:di ......
Linux 环境进程间通信(六)
套接口
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width=" ......