Source code compilation MySQL5.1 generate InnoDB storage engine _ MySQL

Source: Internet
Author: User
Source code compilation MySQL5.1 generate InnoDB storage engine bitsCN.com

Compile MySQL 5.1 with source code to generate the InnoDB storage engine

Here we will only list the main steps:

[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'  

Verification results:

[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  

If a single server runs MySQL 5.5 and MySQL 5.1, then:

① The sock file cannot be placed in a public directory, such as/tmp

② When starting mysql, you should also use the -- defaults-file parameter to specify the configuration 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   


BitsCN.com
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.