来源:自学PHP网 时间:2015-04-16 10:51 作者: 阅读:次
[导读] 源码编译MySQL 5 1生成InnoDB存储引擎这里就仅列出主要步骤:[plain] configure --prefix= home mysql51 mysql --enable-assembler --enable-local-infile --enable-thread-safe-client --with-bi...
源码编译MySQL 5.1生成InnoDB存储引擎
这里就仅列出主要步骤:
[plain] ./configure --prefix=/home/mysql51/mysql/ --enable-assembler --enable-local-infile --enable-thread-safe-client --with-big-tables --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8,ascii --with-readline --with-ssl --with-embedded-server --with-pthread --with-mysqld-user=mysql51 --with-plugins=all > /home/mysql51/mysql_setuplogs_configure.log 2>&1 ./scripts/mysql_install_db --basedir=/home/mysql51/mysql --datadir=/home/mysql51/mysql/data --user=mysql51 --defaults-file=/home/mysql51/mysql/my.cnf --force mysqld_safe --defaults-file=/home/mysql51/mysql/my.cnf & mysqladmin -u root -S /home/mysql51/mysql/mysql.sock password 'oracle'
验证效果:
[plain] mysql> select version(); +------------+ | version() | +------------+ | 5.1.72-log | +------------+ mysql> show plugins; +------------+----------+----------------+---------+---------+ | Name | Status | Type | Library | License | +------------+----------+----------------+---------+---------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | GPL | | partition | ACTIVE | STORAGE ENGINE | NULL | GPL | | ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL | | BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL | | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | | FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | ndbcluster | DISABLED | STORAGE ENGINE | NULL | GPL | +------------+----------+----------------+---------+---------+ 11 rows in set (0.00 sec) mysql> create table test.t_innodb(id int) engine=innodb; Query OK, 0 rows affected (0.04 sec) mysql> show create table test.t_innodb\G; *************************** 1. row *************************** Table: t_innodb Create Table: CREATE TABLE `t_innodb` ( `id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 1 row in set (0.00 sec) ERROR: No query specified
如果单台服务器上既跑MySQL 5.5又跑MySQL 5.1,那么:
① sock文件不能放在公用目录下,比如/tmp
② 启动mysql时也应该借助参数--defaults-file来指定配置文件my.cnf
[plain] [root@localhost ~]# netstat -lntp | grep :3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 22171/mysqld [root@localhost ~]# netstat -lntp | grep :3307 tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 31183/mysqld
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com