Solved

My SQL wont start (path /etc/rc.d/init.d/mysqld not found)

Posted on 2008-06-25
16
1,519 Views
Last Modified: 2008-09-17
Hello, I have a fresh install of Red Hat 5.2 which I think comes with MySql installed (rpm -qa | grep -i mysql yields ' mysql-5.0.45-7.el5'). mysqladmin -V yields 'mysqladmin  Ver 8.41 Distrib 5.0.45, for redhat-linux-gnu on i686'

Now, I don't seem to have some of the paths I would be expecting.

I have the /usr/bin/my(mysqlshow | mysqladmin | mysql | mysqldump | mysqlimport)
I have /etc/my.cnf

I don't have /etc/rc.d/init.d/mysqld
I don't have the database directory of /var/lib/mysql, actually nothing is here, no socket file, anything...
0
Comment
Question by:AbeSpain
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
16 Comments
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21864410
   Hi!

Have you looked into the my.cnf file.
The basedir should tell you where the mysqld file is.
mysql.sock is usually in the /tmp folder if not look for the folder
/var/lib/mysql for both mysqld and mysql.sock.

Regards,
   Tomas Helgi
0
 

Author Comment

by:AbeSpain
ID: 21864444
Contents of my.conf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I cant find the file mysql.sock if I search for it.
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21864590
Is the mysql.sock in the /var/lib/mysql/ directory ?
go into that directory (using cd :) and execute there
ls -l mysql*

Is the mysql.sock in that list ? Or mysqld ?
If so then most likely the rpm database or locate/find database are not up to date
and that may lead not finding the files you are searching for.

Regards,
   Tomas Helgi
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:AbeSpain
ID: 21864953
There is no such folder under /var/lib/, so like I originally said, some of the files are on the server but not all of them. Why would this be? Also, how can I fix this install?
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21865282
Then I believe you have to reinstall the mysql server.D
Download the newest rpm's for your Redhat linux and do a rpm -Uhv *.rpm on these files.
That will install/update all the required/missing files.

Regards,
   Tomas Helgi
0
 

Author Comment

by:AbeSpain
ID: 21865814
Cheers Tomas, where do I get the latest rpm's from?
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21866146
Go to
http://rpm.pbone.net/
and choose search and then advanced search
type mysqld (mysql server) in the search box and check Redhat EL5 (in the RHEL row ).
and hit search.

You should get a list of sites that has the package you nead.
For the GUI tools simply type mysqladminstrator (if that is not already included in the mysqld rpm).

Regards,
   Tomas Helgi
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21866193
sorry mysqladmin not mysqladministrator

Regards,
   Tomas Helgi
0
 

Author Comment

by:AbeSpain
ID: 21866949
[root@thedesignfly02 ~]# rpm - i mysql-5.0.45-7.el5.i386.rpm
warning: mysql-5.0.45-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 82fd17b2
        package mysql-5.0.45-7.el5 is already installed
        file /usr/bin/my_print_defaults from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysql from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysql_config from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysql_waitpid from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqladmin from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqlbinlog from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqlcheck from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqldump from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqlimport from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/bin/mysqlshow from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/lib/mysql/libmysqlclient.so.15.0.0 from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/lib/mysql/libmysqlclient_r.so.15.0.0 from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
        file /usr/lib/mysql/mysqlbug from install of mysql-5.0.45-7.el5 conflicts with file from package mysql-5.0.45-7.el5
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21868204
   Hi!

Use either the command
rpm -Uhv mysql-5.0.45-7.el5.i386.rpm (Updates the previous installed package to newer version and sometimes fixes lost files)
or if that doesn't work use
rpm -i --replacefiles --replacepkgs mysql-5.0.45-7.el5.i386.rpm (which will force reinstallation of the same version of the package)

Regards,
   Tomas Helgi
0
 

Author Comment

by:AbeSpain
ID: 21869087
Tried the first command, says it is already installed.

Second command gave me a key warning but that doesnt stop the process right. Didnt say anything else after that but I can still not see mysqld or the socket.
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21869842
Did you download all the packages I mentioned in the earlier post ?
mysql-5.0.45-7.el5.i386.rpm seems to have only the GUI (admin tools)

Try these links
1) MySQL Server Community version 5.0.51a for Redhat EL 5
http://rpm.pbone.net/index.php3/stat/4/idpl/5796596/com/MySQL-server-community-5.0.51a-0.rhel5.i386.rpm.html
2) MySQL admin and other Client GUI's (same version)
http://rpm.pbone.net/index.php3/stat/4/idpl/5796510/com/MySQL-client-community-5.0.51a-0.rhel5.i386.rpm.html

Try and see if this won't work.

Regards,
   Tomas Helgi
0
 

Author Comment

by:AbeSpain
ID: 21870139
Buh still nothing.
rpm -Uhv MySQL-client-community-5.0.51a-0.rhel5.i386.rpm
        package MySQL-client-community-5.0.51a-0.rhel5 is already installed
        file /usr/bin/mysql from install of MySQL-client-community-5.0.51a-0.rhel5 conflicts with file from package mysql-5.0.45-7.el5

///
rpm -Uhv MySQL-server-community-5.0.51a-0.rhel5.i386.rpm
error: Failed dependencies:
        libmysqlclient.so.15 is needed by (installed) dovecot-1.0.7-2.el5.i386
        libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) dovecot-1.0.7-2.el5.i386

The other method doesnt work either (rpm -i --replacefiles --replacepkgs)
0
 

Author Comment

by:AbeSpain
ID: 21998806
I compile from source in the end after reinstalling. In this case, what does one do about point assigning? I haven't used the solution although the help has been appreciated and probably helped.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 22507453
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to count in a table in php 22 50
paypal ipn to mysql 3 81
Create a MySQL table as easily as possible 6 61
Mysql how to execute a commands file 5 33
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…

730 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