为安装 fedarated引擎
决定重新编译安装 mysql 数据库我当前找了一个虚拟机器 32位 centos
在源码下载包选择哪一个编译安装好SuSE Linux Enterprise Server ver. 11 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles11.src.rpm) MD5: 714c5f8bf4b1816bb88951649d9298aa
Red Hat & Oracle Enterprise Linux 5 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel5.src.rpm) MD5: 8c386345d6374be174033f3a17d49a0b
SuSE Linux Enterprise Server 10 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles10.src.rpm) MD5: ca2ed7f15fae60331f40b0083847fe39
Generic Linux (glibc 2.3) (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-5.1.49-1.glibc23.src.rpm) MD5: 40cb7b0399b3a174e9b9e06281f1036f
SuSE Linux Enterprise Server 9 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles9.src.rpm) MD5: 9e171c70c47d6792b0856021bbd12353
Red Hat & Oracle Enterprise Linux 4 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel4.src.rpm) MD5: 897d2e9ffbe9109072fe22bcafa91788
Red Hat Enterprise Linux 3 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel3.src.rpm) MD5: bc855486bd2b4d5d029d7b6bba4d4361
Generic Linux (Architecture Independent), Compressed TAR Archive 5.1.49 22.6M
Download
(mysql-5.1.49.tar.gz)(rpm 版本我记得必须选择32位或者 64位的 , 那么这个该如何选择, 难道不选择了??)
决定重新编译安装 mysql 数据库我当前找了一个虚拟机器 32位 centos
在源码下载包选择哪一个编译安装好SuSE Linux Enterprise Server ver. 11 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles11.src.rpm) MD5: 714c5f8bf4b1816bb88951649d9298aa
Red Hat & Oracle Enterprise Linux 5 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel5.src.rpm) MD5: 8c386345d6374be174033f3a17d49a0b
SuSE Linux Enterprise Server 10 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles10.src.rpm) MD5: ca2ed7f15fae60331f40b0083847fe39
Generic Linux (glibc 2.3) (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-5.1.49-1.glibc23.src.rpm) MD5: 40cb7b0399b3a174e9b9e06281f1036f
SuSE Linux Enterprise Server 9 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.sles9.src.rpm) MD5: 9e171c70c47d6792b0856021bbd12353
Red Hat & Oracle Enterprise Linux 4 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel4.src.rpm) MD5: 897d2e9ffbe9109072fe22bcafa91788
Red Hat Enterprise Linux 3 (Architecture Independent), RPM Package 5.1.49 22.0M
Download
(MySQL-community-5.1.49-1.rhel3.src.rpm) MD5: bc855486bd2b4d5d029d7b6bba4d4361
Generic Linux (Architecture Independent), Compressed TAR Archive 5.1.49 22.6M
Download
(mysql-5.1.49.tar.gz)(rpm 版本我记得必须选择32位或者 64位的 , 那么这个该如何选择, 难道不选择了??)
解决方案 »
- mysql两个表字段名不同,能设置为外键没?
- connect fail的问题,紧急求助啊,有没好心人帮忙看看啊
- c++ 调用mysql出错
- mysql 批量新增例名时,会出错..怪事
- 求一SQL语句,把文章ID重新回到1开始
- 求一select语句:如何实现MySQl的递归查询
- MySQL的查询高速缓存的机制到底是怎样的?
- 紧急求助!为何联不上远程的MYSQL服务器?(高人请进,比效难)
- mysql插入数据报错 Incorrect string value: '\xF4\x8F\xAE\xB3</...'
- MySql ifnull 语句问题
- 可否用存储过程来做这件事?
- MySQL CPU占用率问题(解决立即结贴)
Linux upsmonitor 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i38 6 GNU/Linux
这个是os的信息
Generic Linux (Architecture Independent), Compressed TAR Archive 5.1.49 22.6M
Download
(mysql-5.1.49.tar.gz)
checking for wint_t in wctype.h... yes
checking for tgetent in -lncursesw... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found[root@spirit-desktop mysql-5.1.49]# make
make: *** No targets specified and no makefile found. Stop
MySQL-community-5.1.49-1.rhel3.src.rpm) MD5: bc855486bd2b4d5d029d7b6bba4d4361
Generic Linux (Architecture Independent), Compressed TAR Archive 5.1.49 22.6M
Download
(mysql-5.1.49.tar.gz)
安装目录如下 -rw-r--r-- 1 7155 staff 315901 Jul 9 20:37 aclocal.m4
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:06 BUILD
-rw-r--r-- 1 7155 staff 29205 Jul 9 20:37 ChangeLog
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 client
-rwxr-xr-x 1 7155 staff 13876 Jul 9 20:35 CMakeLists.txt
drwxrwxrwx 4 7155 staff 4096 Jul 9 21:01 cmd-line-utils
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:01 config
-rwxr-xr-x 1 7155 staff 45449 Jul 9 20:38 config.guess
-rw-r--r-- 1 root root 512146 Aug 4 15:36 config.log
-rwxr-xr-x 1 7155 staff 33774 Jul 9 20:38 config.sub
-rwxr-xr-x 1 7155 staff 1430247 Jul 9 20:38 configure
-rw-r--r-- 1 7155 staff 94034 Jul 9 20:34 configure.in
-rw-r--r-- 1 7155 staff 17987 Jul 9 20:34 COPYING
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 dbug
-rwxr-xr-x 1 7155 staff 17867 Jul 9 20:38 depcomp
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 Docs
-rw-r--r-- 1 7155 staff 5139 Jul 9 20:35 EXCEPTIONS-CLIENT
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:01 extra
drwxrwxrwx 4 7155 staff 4096 Jul 9 21:01 include
-rwxr-xr-x 1 7155 staff 13620 Jul 9 20:38 install-sh
-rw-r--r-- 1 7155 staff 381761 Jul 9 20:37 INSTALL-SOURCE
-rw-r--r-- 1 7155 staff 13308 Jul 9 20:37 INSTALL-WIN-SOURCE
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 libmysql
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:02 libmysqld
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 libmysql_r
-rwxr-xr-x 1 7155 staff 243268 Jul 9 20:38 ltmain.sh
-rw-r--r-- 1 7155 staff 12043 Jul 9 20:34 Makefile.am
-rw-r--r-- 1 7155 staff 39146 Jul 9 20:38 Makefile.in
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:02 man
-rwxr-xr-x 1 7155 staff 11135 Jul 9 20:38 missing
drwxrwxrwx 10 7155 staff 4096 Jul 9 21:03 mysql-test
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 mysys
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:02 netware
drwxrwxrwx 4 7155 staff 4096 Jul 9 21:02 plugin
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:01 pstack
-rw-r--r-- 1 7155 staff 62989 Jul 9 20:35 README
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 regex
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 scripts
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:06 server-tools
drwxrwxrwx 3 7155 staff 12288 Jul 9 21:02 sql
drwxrwxrwx 5 7155 staff 4096 Jul 9 21:06 sql-bench
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 sql-common
drwxrwxrwx 14 7155 staff 4096 Jul 9 21:01 storage
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 strings
drwxrwxrwx 4 7155 staff 4096 Jul 9 21:06 support-files
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:02 tests
drwxrwxrwx 5 7155 staff 4096 Jul 9 21:01 unittest
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:02 vio
drwxrwxrwx 3 7155 staff 4096 Jul 9 21:06 win
-rwxr-xr-x 1 7155 staff 6204 Jul 9 20:38 ylwrap
drwxrwxrwx 2 7155 staff 4096 Jul 9 21:01 zlib奇怪为什么是 7155 staff
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all --with-tcp-port=3306 --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock --with-mysqld-user=mysql --with-federated-storage-engine安装是否要把他们都换成 mysql:mysql
[Note] Plugin 'FEDERATED' is disabled.mysql配置文件中,添加一行federated,重新启动mysql就可以了![mysqld]
federatedTo include the FEDERATED storage engine if you build MySQL from source, invoke configure with the --with-federated-storage-engine option. Beginning with MySQL 5.1.26, the FEDERATED storage engine is not enabled by default in the running server; to enable FEDERATED, you must start the MySQL server binary using the --federated option
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | YES | Federated MySQL storage engine | NO | NO | NO |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.01 sec)mysql> select version();
+----------------------+
| version() |
+----------------------+
| 5.1.40-community-log |
+----------------------+
1 row in set (0.00 sec)
#password = your_password
port = 3306
socket = /tmp/Mysql3306.sock# The Mysql server
[Mysqld]
port = 3306
socket = /tmp/Mysql3306.sock打开下面几项innodb_data_home_dir = =/usr/local/mysql/var/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = =/usr/local/mysql/var/
innodb_log_arch_dir = =/usr/local/mysql/var///我第一次configure时--prefix=后面的路径误写成/usr /lcoal/mysql 发现后删除该安装目录,再次安装时发现安装过程报错(又到/usr/lcoal/mysql下读文件),打开配置文件发现该选项中的路径都被系统改为 /usr/lcoal/mysql/var --解决办法改正该路径,同时到mysql源码文件下执行make clean 再次make 就ok了7.安装数据库命令:./bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=Mysql说明:必须用参数--defaults-file指定my.cnf,否则系统用默认的/etc/my.cnf.8.安装完后,可以看到Mysql/var目录下有数据文件,然后在/usr/local/mysql 用下面命令设置权限:shell> chown -R root .
shell> chown -R Mysql var
shell> chgrp -R Mysql .9.启动数据库../bin/Mysqld_safe --defaults-file=/test/Mysql/my
.cnf --user=Mysql &10.进入数据库../bin/Mysql -u root --socket=/tmp/Mysql3306 --defaults-file=/test/Mysql/my.cnf默认时没有密码,当然如果你删除/etc/my.cnf,可以不要后面的--defaults-file=/test/Mysql/my.cnf./bin/Mysql -u root --socket=/tmp/Mysql3306 也就行了,原因大家应该知道吧!//如果系统已经安装的有mysql了,这时执行mysql会发现系统还是运行的原来的mysqlshell#mysql这时需要停止旧mysql 然后执行如下命令:#cd /usr/bin#rm -rf mysql#ln -s /usr/local/mysql/bin/mysql ./mysql这时再次执行mysql就会执行新版本的mysql;由于以后可能会用到mysql的相关库及头文件建议执行如下操作:#cp -r /usr/local/mysql/include/mysql/* /usr/include/mysql11.设为服务并自启动对于设置为服务只要把Mysql/share/Mysql/Mysql.server放到/etc/init.d/下改名为Mysql命令:mv share/Mysql/Mysql.server /etc/init.d/Mysqlchmod 775 /etc/init.d/Mysqlchkconfig --add Mysql总结,这只是安装了一个3306端口的Mysql,如果要在装一个msyql,步骤一样,只要改动my.cnf文件的内容.[client]
#password = your_password
port = 3310
socket = /tmp/Mysql3310.sock# The Mysql server
[Mysqld]
port = 3310
socket = /tmp/Mysql3310.sockok!就到这吧!
这个可以参考