SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: starting MySQL on Linux 7.1

  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    starting MySQL on Linux 7.1

    I Just installed mysql-3.23.36-1.i386.rpm, mysqlclient9-3.23.22-4.i386rpm and mysql-server-3.23.36-1.i386rpm over Redhat 7.1. I followed instructions both in Redhat's manual and http://www.mysql.com/doc/P/o/Post-installation.html, following links to and reading 2.4.2 Problems Starting the MySQL Server including the comments section.

    So, backing up a bit, after successfully intalling the grant tables, I tried to start the server from /usr/bin with "safe_mysqld &".
    A message came back:
    [root@gopala bin]# Starting mysql daemon with databases from /var/lib/mysql
    010815 08:55:47 mysql ended
    and the curser froze. I hit return and got the message:
    [1]+Done safe_mysql.

    To just check to see if the server is running anyway, I entered "mysqladmin version". Message came back:
    [root@gopala bin]# mysqladmin version
    mysqladmin: connect to server at 'localhost' failed.
    error: Can't connect to local MySQL server through socket '/var/lib/mysql.sock (111)
    Check that mysql is running and that the socket (same as above) exists.

    Checked /var/lib/mysql/mysql.sock. It exists with permissions: srwxrwxrwx.

    Thinking that I may have installed the packages wrong, I uninstalled and reinstalled and rebooted.

    After reboot, used "service httpd start" and got message back that MySQL started.

    Verifying, I again entered "mysqladmin version" and got back the same messages as the last time I verified, i.e. connect to server at 'localhost' failed.
    error: Can't connect to local MySQL server through socket '/var/lib/mysql.sock (111)
    Check that mysql is running and that the socket (same as above) exists.


    Is there some other configuration, not mentioned in the docs, that I must deal with to allow mysql.sock to accept connections?
    Any clues as to what's going on?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A better way to verify if MySQL is running is by doing:
    ps aux|grep mysql

    I would recommend that you reinstall MySQL from source (just get the .tar.gz from mysql.com). RPMs are too often the cause of problems like this one.

    Also, check /var/log/messages and MySQL's log file (don't know where it's located) to see if it has any more information for you.

  3. #3
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks qslack,

    I tried your suggestion.

    Result:
    [paulcj2@gopala paulcj2]$ ps aux|grep mysql
    paulcj2 1427 0.0 0.4 1592 580 pts/0 S 14:57 0:00 grep mysql
    [paulcj2@gopala paulcj2]$

    looks like mysql is indeed running.

    I found a post that suggested the new version has a placement of mysqld elsewhere than the original install. The suggested kludge fix was to create a LINK from where the old mysql.sock file was to where the new file is. However, when I do it, I get a message that the file already exists! As follows:

    [paulcj2@gopala paulcj2]$ ln -s /var/mysql.sock /var/lib/mysql/mysql.sock
    ln: `/var/lib/mysql/mysql.sock': File exists

    I found nothing useful in /var/log/messages. Checking to see where MySQL log file is.

    I have not yet installed anything from source code yet. Hope I don't have to.
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Result:
    [paulcj2@gopala paulcj2]$ ps aux|grep mysql
    paulcj2 1427 0.0 0.4 1592 580 pts/0 S 14:57 0:00 grep mysql
    [paulcj2@gopala paulcj2]$
    Paul,

    That actually means that its not running, all you got back was the result of the grep, no MySQL server appears to running on your system
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your symbolic link needs to point from var/lib/mysql.sock not var/mysql.sock
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp


    Paul,

    That actually means that its not running, all you got back was the result of the grep, no MySQL server appears to running on your system
    I guess I should have said:
    Code:
    ps aux|grep mysql|grep -v 'grep mysql'|wc -l|perl -e 'print "MySQL is ";$_=<>;if(/0/){print "not running."}else{print "running."}print "\n";'

  7. #7
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    still can't get MySQL to start in Redhat 7.1

    tried the new grep string yesterday. Said mysqld not running. Tried recently and string doesn't return a message, just itself.

    tried the new link
    [root@gopala bin]# ln -s /var/lib/mysql/mysql.sock /var/mysql.sock
    the link established itself, but still get same messages
    [root@gopala bin]# safe_mysqld &
    [1] 2660
    [root@gopala bin]# Starting mysqld daemon with databases from /var/lib/mysql
    010817 10:38:50 mysqld ended

    Queried all parts of the installation. RPM says the server is installed:

    [root@gopala bin]# rpm -q -i mysql-server-3.23.36-1
    Name : mysql-server Relocations: (not relocateable)
    Version : 3.23.36 Vendor: Red Hat, Inc.
    Release : 1 Build Date: Wed 28 Mar 2001 01:17:4T
    Install date: Wed 15 Aug 2001 08:16:59 AM EDT Build Host: porky.devel.redhm
    Group : Applications/Databases Source RPM: mysql-3.23.36-1.src.rpm
    Size : 2278250 License: GPL
    Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
    URL : http://www.mysql.com
    Summary : MySQL server
    Description :
    MySQL is a true multi-user, multi-threaded SQL database server. SQL is
    the most popular database language in the world. MySQL is a client/server
    implementation that consists of a server daemon mysqld and many different
    client programs and libraries. This package contains the MySQL server and
    some accompanying files and directories.

    RPM says the following server files are installed:

    [root@gopala bin]# rpm -q -l mysql-server-3.23.36-1
    /etc/logrotate.d/mysqld
    /etc/rc.d/init.d/mysqld
    /usr/bin/mysqladmin
    /usr/bin/safe_mysqld
    /usr/libexec/mysqld
    /var/lib/mysql
    /var/log/mysqld.log
    /var/run/mysqld

    MySQL support suggested I make a link /etc/rd.d/init.d/->/etc/init.d, which I did and restarted /etc/init.d/mysqld start. Got an [OK]

    However, still getting the same errors:


    Here are the log entries from var/log/mysqld.log

    [root@gopala log]# vi mysqld.log

    010815 08:55:47 mysqld started
    010815 8:55:47 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno
    : 13)
    010815 08:55:47 mysqld ended

    010815 09:02:49 mysqld started
    010815 9:02:49 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno
    : 13)
    010815 09:02:49 mysqld ended

    010815 10:18:16 mysqld started
    /usr/libexec/mysqld: Too many parameters
    /usr/libexec/mysqld Ver 3.23.36 for redhat-linux-gnu on i386
    Use '--help' or '--no-defaults --help' for a list of available options
    010815 10:18:16 mysqld ended

    010815 10:20:00 mysqld started
    010815 10:20:00 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno
    : 13)
    010815 10:20:00 mysqld ended

    Not sure what "/usr/libexec/mysqld" or "./msql/host.frm" files are. Do not see either in the list of installed files. Could this be the source of the problem? Anyone know about these files?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always just get lost trying to use RPMs. If you want my honest opinion, I would get rid of the RPM, using rpm -e to get rid of it. Then download the source and compile it yourself, it always works out better at least for me.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  9. #9
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting rid of rpm

    Gulp!

    Somehow the thought of downloading the source and compiling it myself gives me the willies. However, you are the 2nd person to recommend I go this route. So, I guess I will.

    I have already installed apache 1.3.19-5.i386rpm and soon plan to install PHP 4.0 on this server. In order to get all three to play nicely together, do you recommend that I wipe the slate clean and install all three from the source?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  10. #10
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most definitely, the apache RPM sucks too. Seriously you can compile all three in about 1.5 hours, at least after you have done it a few times. The docs are very ggod at explaining how do it.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  11. #11
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    installing from source code

    Okee dokee. Here goes.

    Many thanks.
    Paul C.
    ClickBasics
    http://www.clickbasics.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •