Solved

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

Posted on 2008-06-25
16
1,509 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
  • 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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now