?
Solved

mysql 5 on FC4

Posted on 2006-05-05
19
Medium Priority
?
1,937 Views
Last Modified: 2013-11-13
How do i uninstall my current mySQL4 and install mySQL5 automatically on my FC4 server.
I don't even know i have mysql4 in there.

# mysqladmin -v
mysqladmin  Ver 8.41 Distrib 4.1.16, for redhat-linux-gnu on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
0
Comment
Question by:jedistar
  • 12
  • 4
  • 3
19 Comments
 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 400 total points
ID: 16614502
Hi,

To check your version of mysql do the following:

rpm -q mysql-*

to remoe the only version of MySQL type:

yum remove mysql

And you install MySQL 5 have a read of:

http://wiki.astbill.com/wiki/Upgrade_Fedora_Core_4_with_Mysql_4.14_to_MySQL_5.0.15
0
 

Author Comment

by:jedistar
ID: 16614620
thats upgrade rite.
i tried to do it but it had erors:

21:55:18 (1.15 MB/s) - `mysql-standard-5.0.21-linux-i686.tar.gz' saved [31899624/31899624]

[root@dual local]# tar xfoz mysql-standard-5.0.21-linux-i686.tar.gz
[root@dual local]# ln -s /usr/local/mysql-standard-5.0.21-linux-i686 mysql
[root@dual local]# cd mysql
[root@dual mysql]# scripts/mysql_install_db --user=mysql
chown: `mysql': invalid user
Installing all prepared tables
060505 21:55:57 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

060505 21:55:57 [ERROR] Aborting

060505 21:55:57 [Note] ./bin/mysqld: Shutdown complete


chown -R root .
chown -R mysql data
chgrp -R mysql .Installation of system tables failed!

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

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data 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 ./bin/mysqlbug script!
0
 

Author Comment

by:jedistar
ID: 16614624
anyway to use yum to install mysql5
and run/start it.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 16

Expert Comment

by:xDamox
ID: 16614735
Hi,

In your /etc/paswd file you should have an entry that looks liek:

mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash

try this:

yum install mysql5

Tell me if that works
0
 

Author Comment

by:jedistar
ID: 16615081
Added 66 new packages, deleted 4 old in 5.02 seconds
Parsing package install arguments
No Match for argument: mysql5
Nothing to do
0
 
LVL 16

Expert Comment

by:xDamox
ID: 16615416
Hi,

Would it be possible for you to upgrade to FC5? I had a look around and SELinux seems to make it hard to
install MySQL 5 onto FC4.

0
 

Author Comment

by:jedistar
ID: 16615445
nope not possible as we have some requirements for FC5
0
 

Author Comment

by:jedistar
ID: 16615452
FC4 i mean
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 600 total points
ID: 16615471
You can't directly install mysql5 usinf yum on FC4, as it is not part of the standard repository.....of course, you could create your own custom repository...but I guess you don't want to go to that amount of time and effort. So....you need to go here:

http://dev.mysql.com/downloads/mysql/5.0.html

and download the appropriate rpms for your architecture. (Use the RHEL 4 downloads for FC4) Once you have downloaded the rpms, install using "rpm -ivh".

However, it may be that you get all sorts of 'inconsistancy errors', or requirements. If you want to try and match them up then feel free to try, but I suspect that it'll get messy. THEREFORE, download the statically linked RPMs, which should not give you this problem. You will need to to install with the rpm command rather than yum.

HTH:)

0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16615481
...if you get that error about no mysql user, then:

useradd mysql

will solve the problem.

HTH:)
0
 

Author Comment

by:jedistar
ID: 16622482
# rpm -ivh MySQL-server-standard-5.0.21-1.rhel3.i386.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-standard  ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h mywebsite.com.au password 'new-password'
See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Starting MySQL...................................[FAILED]


Got a fail!
0
 

Author Comment

by:jedistar
ID: 16622487
/var/log/messages says:

May  7 02:49:12 www kernel: audit(1146941352.713:424): avc:  denied  { append } for  pid=1223 comm="mysqld" name="mywebsite.com.au.err" dev=dm-0 ino=12681296 scontext=root:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=file
May  7 02:49:12 www kernel: audit(1146941352.713:425): avc:  denied  { append } for  pid=1223 comm="mysqld" name="mywebsite.com.au.err" dev=dm-0 ino=12681296 scontext=root:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=file
May  7 02:49:14 www kernel: audit(1146941354.405:426): avc:  denied  { create } for  pid=1223 comm="mysqld" name="mysql.sock" scontext=root:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=sock_file
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16622512
Security Enhanced Linux is stopping you from connecting to this - Easiest way to get it to run is to disable the SEL functionality:

Edit:

/etc/sel/sel.conf

or

/etc/sel.conf

and change the configuration file to 'disabled'

That'll solve this problem

HTH:)
0
 

Author Comment

by:jedistar
ID: 16623621
Do i need to reboot coz i got the same error?
0
 

Author Comment

by:jedistar
ID: 16623648
Can i disable SELINUX without rebooting, i already edited the file in
/etc/selinux/config

the same prob is still occuring.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16624313
Try rebooting, because that error is as a result of SEL.
0
 

Author Comment

by:jedistar
ID: 16631094
fixed it.
where are the binaries?

i did a mysql mysqladmin etc, all commands not found?
0
 

Author Comment

by:jedistar
ID: 16631118
My mysql is running and i tried to do this but it failed.

# /usr/local/mysql/bin/mysqladmin create dd
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

# /usr/local/mysql/bin/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

# ps ax|grep mysql
10839 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/dual.server.com.pid
10860 ?        Sl     0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/dual.server
0
 

Author Comment

by:jedistar
ID: 16640090
anyone?
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question