LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-27-2008, 08:22 AM   #1
oferu
LQ Newbie
 
Registered: Apr 2006
Posts: 8

Rep: Reputation: 0
Having problems installing MySQL on red hat 9. Cannot find mysql.sock


Hi,

I previously wanted to upgrade MySQL but after receiving errors (mostly dependency errors) and realizing that my current MySQL version is the last tested version for the Red Hat 9 distribution, I finally decided to leave MySQL as is.
Unfortunately, while trying to install, I probably caused MySQL to no longer work properly. So I am trying to uninstall and reinstall but receiving errors.

//Checking which Mysql packages i need to uninstall
[oferu@localhost oferu]$ rpm - qa | grep -i mysql
perl-DBD-MySQL-2.1021-3
mysql-server-3.23.58-1.9
mysql-3.23.58-1.9

//Uninstall
[oferu@localhost oferu]$ rpm -e --nodeps perl-DBD-MySQL
[oferu@localhost oferu]$ rpm -e --nodeps mysql-server
[oferu@localhost oferu]$ rpm -e --nodeps mysql
[oferu@localhost oferu]$

//Now I have no mysql packages installed
[oferu@localhost /]$ rpm - qa | grep -i mysql
[oferu@localhost oferu]$

//Install (installing this way did not work)
[root@localhost forms]# apt-get install mysql
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
perl-DBD-MySQL
The following NEW packages will be installed:
mysql perl-DBD-MySQL
0 upgraded, 2 newly installed, 0 removed and 2 not upgraded.
Need to get 185kB/6156kB of archives.
After unpacking 17.0MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err http://ayo.freshrpms.net redhat/9/i386/os/ perl-DBD-MySQL 2.1021-3
404 Not Found
Failed to fetch http://ayo.freshrpms.net//redhat/9/i...021-3.i386.rpm 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[root@localhost forms]#

//Installing with rpms seems to work
//perl-DBD-MySQL - From the above (in bold) I looked for version 2.1021-3
[root@localhost temp]# rpm -i --nodeps perl-DBD-MySQL-2.1021-3.i386.rpm perl-DBD-MySQL-2.1021-3.i386.rpm
warning: package perl-DBD-MySQL = 2.1021-3 was already added, replacing with perl-DBD-MySQL <= 2.1021-3
[root@localhost temp]#

//mysql - (I am assuming that this is the mysql server package). I found that 3.23.58-1.9 is the latest stable version for red hat 9 distribution

[root@localhost temp]# rpm -i mysql-3.23.58-1.9.i386.rpm mysql-3.23.58-1.9.i386.rpm
warning: package mysql = 3.23.58-1.9 was already added, replacing with mysql <= 3.23.58-1.9
[root@localhost temp]#

//Installing MySQL-Client. I could not find the same version as the above //install (3.23.58-1.9). I hope 3.23.58-1 is close enough.
//Following did not work so added --force

[root@localhost temp]# rpm -i MySQL-client-3.23.58-1.i386.rpm MySQL-client-3.23.58-1.i386.rpm
warning: MySQL-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
warning: package MySQL-client = 3.23.58-1 was already added, replacing with MySQL-client <= 3.23.58-1
file /usr/bin/mysql from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/bin/mysqlbinlog from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/bin/mysqlcheck from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/bin/mysqldump from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/bin/mysqlimport from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/bin/mysqlshow from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/share/man/man1/mysql.1.gz from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/share/man/man1/mysqlaccess.1.gz from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/share/man/man1/mysqladmin.1.gz from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/share/man/man1/mysqldump.1.gz from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9
file /usr/share/man/man1/mysqlshow.1.gz from install of MySQL-client-3.23.58-1 conflicts with file from package mysql-3.23.58-1.9


//With --force seemed to work
[root@localhost temp]# rpm -i --force MySQL-client-3.23.58-1.i386.rpm MySQL-client-3.23.58-1.i386.rpm
warning: MySQL-client-3.23.58-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
warning: package MySQL-client = 3.23.58-1 was already added, replacing with MySQL-client <= 3.23.58-1
[root@localhost temp]#

//Now I have new packages installed
[oferu@localhost /]$ rpm - qa | grep -i mysql
MySQL-client-3.23.58-1
mysql-3.23.58-1.9
perl-DBD-MySQL-2.1021-3
[oferu@localhost /]$

//My question - Trying to run MySQL - I am receiving an error
[root@localhost /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost /]#


//I have no file named mysql.sock anywhere (fn is a search alias)
[root@localhost /]# fn sock | grep -i mysql
./usr/local/mysql-4.1.5-gamma/libmysql_r/viosocket.c
./usr/local/mysql-4.1.5-gamma/libmysql/.deps/viosocket.Plo
./usr/local/mysql-4.1.5-gamma/libmysql/viosocket.c
./usr/local/mysql-4.1.5-gamma/libmysql/.libs/viosocket.o
./usr/local/mysql-4.1.5-gamma/libmysql/viosocket.o
./usr/local/mysql-4.1.5-gamma/libmysql/viosocket.lo
./usr/local/mysql-4.1.5-gamma/ndb/src/common/util/socket_io.cpp
./usr/local/mysql-4.1.5-gamma/ndb/include/util/socket_io.h
./usr/local/mysql-4.1.5-gamma/vio/viosocket.c
./usr/local/mysql-4.1.5-gamma/vio/.deps/viosocket.Po
./usr/local/mysql-4.1.5-gamma/vio/viosocket.o
[root@localhost /]#

In addition, although it seems I have re-installed mysql:
/sbin/service mysql start
mysql: unrecognized service

Can someone help with this error message?

Thanks,
Ofer
 
Old 05-27-2008, 08:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
Please scroll down to the bottom of this page for a nmber of identical issues. Please try searching this site and google in future for very common errors like this.

in short... you've not got the mysql service even running.
 
Old 05-27-2008, 08:31 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,772

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
You need to start the mysql server before you can log in to mysql. Try '/usr/bin/mysqld_safe' then try 'mysql' to start the client.
 
Old 05-27-2008, 07:13 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Assuming that really is RH9, not RH Fedora 9 (which appears to be the case), that hasn't been supported/updated since 2004(?).
You'd be much more secure and less stress if you upgraded to a current distro eg See RH Fedora or Centos.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mohadesz Linux - Server 3 03-15-2008 05:06 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mathimca05 Linux - Newbie 2 10-17-2007 02:04 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 12:08 AM


All times are GMT -5. The time now is 11:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration