Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to compile mysql with InnoDB support?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
marquischan
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2005
Posts: 108

PostPosted: Fri Jun 24, 2005 2:43 pm    Post subject: How to compile mysql with InnoDB support? Reply with quote

How to compile mysql with InnoDB support?
Thanks
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Fri Jun 24, 2005 3:14 pm    Post subject: Reply with quote

add 'innodb' to the USE flags of /etc/make.conf, BTW emerge ufed
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Fri Jun 24, 2005 4:09 pm    Post subject: Reply with quote

Code:

kashani@azul ~ $ emerge -pv mysql

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-db/mysql-4.0.24  +berkdb -debug +innodb +perl +readline (-selinux) +ssl -static +tcpd 0 kB


Easiest thing to do is add innodb to your package.use file

echo "dev-db/mysql innodb" >> /etc/portage/package.use

IIRC the Mysql 4.1 ebuild enables Innodb by default due to a request from upstream.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
stickboy2642
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jan 2004
Posts: 129
Location: MT, USA

PostPosted: Fri Jun 24, 2005 10:21 pm    Post subject: Reply with quote

Also make sure that you turn innodb on in the config file:

in /etc/mysql/my.cnf, comment out the line that says skip-innodb

Code:

[mysqld]
#skip-innodb
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
log-error       = /var/log/mysql/mysqld.err


Otherwise it will not be available to you, even if you have it set in your use flags.
_________________
<?PHP
if ($desireToSolveProblem > 0){
solve($problem);
}else{
drink($beer);
} ?>
Back to top
View user's profile Send private message
marquischan
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2005
Posts: 108

PostPosted: Sat Jun 25, 2005 3:15 am    Post subject: Reply with quote

If I have emerged mysql already,
can I reemerge it again and add innoDB into it?
Back to top
View user's profile Send private message
ter_roshak
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 171
Location: Everett, WA

PostPosted: Sat Jun 25, 2005 5:26 am    Post subject: Reply with quote

marquischan wrote:
If I have emerged mysql already,
can I reemerge it again and add innoDB into it?


That's right, just re-emerge it after changing your use flags. Remember to add the '--newuse' flag to the command line command:

Code:

emerge mysql --newuse -v

_________________
Josh Miller -- RHCE, VCP
Ditree Consulting
http://ditree.com/
Registered Linux User #318200
Back to top
View user's profile Send private message
jan_philip
n00b
n00b


Joined: 16 May 2005
Posts: 5

PostPosted: Mon Dec 05, 2005 2:43 pm    Post subject: innodb Support for mySQL Reply with quote

Hi guys,

i tried serveral guides and howtos how to compile mysql with innodb support.

1) add "innodb" in my make.conf
2) add "dev-db/mysql innodb berkdb" in /etc/portage/package.use
3) emerged with USE="innodb berkdb" emerge mysql

BUT after typping "emerge mysql -pv" there is no marked innodb use-flag...
So every time i tried recompiling i dont found the feature for innodb support in e.g. phpmyadmin.
Did I have to have a special config in my.cnf?
I add:

set-variable = innodb_buffer_pool_size=512M
set-variable = innodb_additional_mem_pool_size=4M
innodb_data_home_dir = /var/lib/mysql/
innodb_log_arch_dir = /var/lib/mysql/
innodb_log_group_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:64M:autoextend:max:512M
set-variable = innodb_log_file_size=8M
set-variable = innodb_log_buffer_size=16M
set-variable = innodb_log_files_in_group=2
innodb_flush_log_at_trx_commit=1

can someone help me with some guide how the my.cnf have to look like OR if there is a mistake in my compiling-process please try to help me... thanx
Back to top
View user's profile Send private message
jan_philip
n00b
n00b


Joined: 16 May 2005
Posts: 5

PostPosted: Tue Dec 06, 2005 1:39 pm    Post subject: Reply with quote

here ist my make.conf:

USE="-3dfx -3dnow -aalib -acl -acpi -afs -alsa -apm -arts -atlas -avi \
berkdb -bonobo -canna -cdr -cjk -cscope -cups -curl -debug \
-dedicated -dga -directfb -doc -dvb -dvd -dvdr -emacs -emacs-w3 \
-encode -esd -ethereal -ev6 -evo -fastcgi -fbcon -firebird \
-flash -foomaticdb -freetds -freewnn -gb -gdbm -ggi -gif -gnome \
-gphoto2 -gpm -gps -gstreamer -gtk -gtk2 -gtkhtml -guile -icc \
-icc-pgo imap -imlib innodb -informix -ipv6 -jack -joystick \
jpeg -junit -kde -kerberos -krb4 -ladcca -lcms ldap -leim \
-libg++ -libgda -lirc -mad -matrox -mcal -mikmod -mmx -motif \
-mozilla -mpeg -mpi -mule -plotutils png -pnp -postgres -prelude \
-python -qt -quicktime -readline -ruby -samba -scanner -sdl \
-slang -slp -snmp -socks5 -spell -svga -tcltk -tetex -tiff \
truetype -trusted -usb -videos -voodoo3 -wavelan -wmf -wxwindows \
-X -Xaw3d -xface -xinerama -xosd -xmms -xv -zeo apache2 \
-DSPF vhosts libspf2 crypt gd gd-external php -java freetype lmtp \
nls pdflib exiscan exiscan-acl jikes pam maildir libwww \
memlimit -mbox mysql sasl sse ssl tcpd xml xml2 zlib x86"

here is my /etc/portage/package.use

dev-db/mysql innodb

-----

emerge -pv mysql

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild U ] dev-db/mysql-4.1.14 [4.0.25-r2] +berkdb -big-tables -cluster -debug -doc -extraengine -geometry -minimal +perl -readline (-selinux) +ssl -static +tcpd -utf8 16,724 kB
[ebuild U ] dev-perl/DBD-mysql-2.9007 [2.9003] 114 kB

Total size of downloads: 16,838 kB

here is my my.cnf

[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock

[safe_mysqld]
err-log = /var/log/mysql/mysql.err

[mysqld]
#skip-innodb
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
log-error = /var/log/mysql/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking

###

set-variable = key_buffer=1536 #2 GB RAM für DB
set-variable = max_allowed_packet=2M
set-variable = table_cache=512 #256
set-variable = sort_buffer_size=2M #1 #NEU
set-variable = read_buffer_size=2M #1 #NEU
#set-variable = sort_buffer=2M #1 ALT
#set-variable = record_buffer=4M #1 ALT
set-variable = thread_cache=8
#set-variable = query_cache_size=32M #NEU
set-variable = thread_concurrency=2 # 2xCPU
set-variable = max_connections=500
set-variable = thread_stack=256K #128
set-variable= myisam_sort_buffer_size=64M # NEU



set-variable = innodb_buffer_pool_size=512M
set-variable = innodb_additional_mem_pool_size=4M
innodb_data_home_dir = /var/lib/mysql/
innodb_log_arch_dir = /var/lib/mysql/
innodb_log_group_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:64M:autoextend:max:512M
# we keep this at around 25% of of innodb_buffer_pool_size
# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
set-variable = innodb_log_file_size=8M
# this is the default, increase if you have very large transactions.
set-variable = innodb_log_buffer_size=16M
# this is the default, and won't hurt you.
# you shouldn't need to tweak it.
set-variable = innodb_log_files_in_group=2
# see the innodb config docs, the other options are not always safe
innodb_flush_log_at_trx_commit=1


# keep secure by default!
bind-address = 127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking
[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M #neu
read_buffer = 2M #neu
write_buffer = 2M neu

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Tue Dec 13, 2005 3:34 am    Post subject: Reply with quote

kashani wrote:


IIRC the Mysql 4.1 ebuild enables Innodb by default due to a request from upstream.

kashani


This is still true.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum