LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-22-2004, 12:15 PM   #1
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Rep: Reputation: 15
mysql-4.1.6-gamma after source install on fedora2 - errors


Hello to everyone,

As mentioned in this guide, i've compiled mysql on my fedora Core 2 system, with the following spec's :


Code:
--------------- bash START --------------
$ uname -a
Linux localhost.localdomain 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT
2004 i686 ath
lon i386 GNU/Linux

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/u
sr/share/info --enable-shared --enable-threads=posix
--disable-checking --disabl
e-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit
--host=i386-redh
at-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

$ ldd --version
ldd (GNU libc) 2.3.3

$ rpm -qa | grep libtermcap
libtermcap-2.0.8-38
libtermcap-devel-2.0.8-38

$ export CFLAGS="-march=athlon-xp -mcpu=athlon-xp -mfpmath=sse -msse2
-O2 -pipe -s -fomit-frame-pointer"
$ export CPPFLAGS="-march=athlon-xp -mcpu=athlon-xp -mfpmath=sse
-msse2 -O2 -pipe -s -fomit-frame-pointer"

$ cd /usr/local/src/mysql-4.1.6-gamma
$ ./configure \
  --prefix=/usr/local/mysql \
  --with-unix-sock-path=/tmp/mysql.sock \
  --with-charset=utf8
$ make
$ make install
--------------- bash END --------------
when i get to the stage of creating the initial database this is what
happens :

Code:
--------------- bash START --------------
$ /usr/local/mysql/bin/mysql_install_db --user=mysql
mkdir: cannot create directory `/usr/local/mysql/var/mysql':
Permission denied
chmod: cannot access `/usr/local/mysql/var/mysql': Permission denied
mkdir: cannot create directory `/usr/local/mysql/var/test': Permission
denied
chmod: cannot access `/usr/local/mysql/var/test': Permission denied
Installing all prepared tables
bin/mysql_install_db: line 1:  3185 Illegal instruction    
/usr/local/mysql/libexec/mysqld --bootstrap --skip-grant-tables
--basedir=/usr/local/mysql --datadir=/usr/local/mysql/var
--skip-innodb --skip-bdb --skip-ndbcluster --user=mysql
--max_allowed_packet=8M
/usr/local/mysql/bin/mysql_create_system_tables: line 664:  3186
Broken pipe             cat  <<END_OF_DATA
use mysql;
$c_d
$i_d

$c_h
$i_h

$c_u
$i_u

$c_f
$i_f

$c_t
$c_c

$c_ht
$c_hc
$c_hr
$c_hk

$c_tzn
$i_tzn
$c_tz
$i_tz
$c_tzt
$i_tzt
$c_tztt
$i_tztt
$c_tzls
$i_tzls
END_OF_DATA

Installation of system tables failed!

Examine the logs in /usr/local/mysql/var for more information.
--------------- bash END --------------

the logs contain nothing useful.
here is the permissions on the folder, tough it's pretty useless as i
run the script as root


Code:
--------------- bash START --------------
$ ls -la /usr/local/mysql/var/
total 20
drwx------   4 mysql root 4096 Oct 21 18:10 .
drwxr-xr-x  12 root  root 4096 Oct 21 05:11 ..
-rw-rw----   1 mysql root   94 Oct 21 18:12 localhost.localdomain.err
drwx------   2 mysql root 4096 Oct 21 05:11 mysql
drwx------   2 mysql root 4096 Oct 21 05:11 test
--------------- bash END --------------

on boot i get the following message :


Code:
--------------- bash START --------------
localhost login: /usr/local/mysql/bin/mysqld_safe: line 1:  2480
Illegal instruction     nohup /usr/local/mysql/libexec/mysqld
--basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql
--pid-file=/usr/local/mysql/var/localhost.localdomain.pid
--skip-locking --port=3306 --socket=/tmp/mysql.sock
>>/usr/local/mysql/var/localhost.localdomain.err 2>&1
STOPPING server from pid file
/usr/local/mysql/var/localhost.localdomain.pid
041021 18:12:18  mysqld ended
--------------- bash END --------------
please help


Thank you, Maxim V.


P.S : If you by any chance see this a second time >> I'm sorry for the "cross web site" question flood:
this has been asked on mailing.database.mysql & on devshed the thing is that i don't know what's the problem & apparently no one else does too because i've yet to see even one person suggesting i would try something to resolve this issue.
 
Old 10-22-2004, 12:36 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
I'll give it a try to help you
According to he guide you used
Quote:
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
you have wrong permissions for the var directory (where mysql store it's databases). But the initial mysql and test databases are somehow existing. Backup and remove them, try the correct chown/chgrp commands and run mysql_install_db again
 
Old 10-22-2004, 01:00 PM   #3
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
ok, i've removed the databases from var:

Code:
$ su -
$ cd /usr/local/mysql
$ mkdir /tmp/sqlbk
$ mv var /tmp/sqlbk/
$ mkdir var
$ chown mysql var
$ chgrp mysql var
$ chmod 770 var
$ ls -la var -d
drwxrwx---  4 mysql mysql 4096 Oct 22 17:49 var
Code:
$ bin/mysql_install_db --user=mysql
Installing all prepared tables
bin/mysql_install_db: line 1:  6711 Illegal instruction     /usr/local/mysql/libexec/mysqld --bootstrap --skip-grant-tables --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --skip-innodb --skip-bdb --skip-ndbcluster --user=mysql --max_allowed_packet=8M
/usr/local/mysql/bin/mysql_create_system_tables: line 664:  6712 Broken pipe             cat  <<END_OF_DATA
use mysql;
$c_d

...
[snip]
...

$i_tzls
END_OF_DATA

Installation of system tables failed!

Examine the logs in /usr/local/mysql/var for more information.
You can also try to start the mysqld daemon with:
/usr/local/mysql/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/local/mysql/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/local/mysql/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql/var that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/local/mysql/bin/mysqlbug script!
same error as before ....

Code:
$ pwd
/usr/local/mysql/var
$ find
.
./test
./mysql
what is this pipe thing the script out puts "line 664: 6712 Broken pipe" ?
I think the problem lias somewhere with the pipe's fs.

I should mention that before installing this version I had a working mysql on this box, v4.0** (don't remember)
I've deleted it using
Code:
rm -rf /usr/local/mysql
before compiling this one. can it be that i didn't deleted something from the old version (some conf file maybe) ?

thanx for the help.
 
Old 10-22-2004, 01:13 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Perhaps you have an old my.cnf in /etc. Check to see if that's the case and replace it, with a newer one
Code:
cp support-files/my-medium.cnf /etc/my.cnf
Also try to run mysql_install_db without the --user=mysql (as root) because I think that the errors are because of the wrong directory permisions
 
Old 10-22-2004, 03:10 PM   #5
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
About my.cnf -- no go there
1. I've copied the new one.
2. I've changed the net_buffer_length to 16.
3. I've tried without the cnf file at all.

i've tried
Code:
# TMPDIR=/tmp/
# MYSQL_UNIX_PORT=/tmp/mysql.sock
# export TMPDIR MYSQL_UNIX_PORT
same error.

one thing i did noticed now it this :
Code:
# /usr/local/mysql/libexec/mysqld --log
Illegal instruction
bad compile ?

I should mention that i'm not an mysql "guru".
does the mysqld needs to be running when i execute [mysql_install_db] script, because as far as i've seen from the code it starts the daemon by it self, correct ?
anyway, for now the daemon will not start at all for me.

that's me > < shoot me !
 
Old 10-22-2004, 04:26 PM   #6
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
Recompiled !

using only --prefix=/usr/local/mysql

& now the script works.

guess thats that.
thank you for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MailScanner errors. New Install. Fedora2 chrisnpg Linux - Security 2 09-07-2005 10:00 AM
install kernel source errors axemanW Fedora 2 03-12-2005 09:46 AM
avidemux 2.0.36 from source install errors Help! Blue1K Linux - Software 1 02-25-2005 11:22 PM
unable to install MySQL 5 on Linux Fedora2 pelegk2 Linux - Software 5 11-10-2004 03:29 AM
MySQL has been updated to 3.23.28-gamma jeremy LQ Suggestions & Feedback 0 11-24-2000 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration