Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1561
  • Last Modified:

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

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
AbeSpain
Asked:
AbeSpain
  • 7
  • 7
1 Solution
 
Tomas Helgi JohannssonCommented:
   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
 
AbeSpainAuthor Commented:
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
 
Tomas Helgi JohannssonCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
AbeSpainAuthor Commented:
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
 
Tomas Helgi JohannssonCommented:
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
 
AbeSpainAuthor Commented:
Cheers Tomas, where do I get the latest rpm's from?
0
 
Tomas Helgi JohannssonCommented:
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
 
Tomas Helgi JohannssonCommented:
sorry mysqladmin not mysqladministrator

Regards,
   Tomas Helgi
0
 
AbeSpainAuthor Commented:
[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
 
Tomas Helgi JohannssonCommented:
   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
 
AbeSpainAuthor Commented:
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
 
Tomas Helgi JohannssonCommented:
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
 
AbeSpainAuthor Commented:
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
 
AbeSpainAuthor Commented:
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
 
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now