Results 1 to 8 of 8

Thread: How do I tell if MySQL DB is installed?

  1. #1

    How do I tell if MySQL DB is installed?

    Hello, newbie here.

    From the command line, what is the *easiest* way to tell if MySQL database is installed on my linux box?

    If it is, how do I start it? Something like: service mysql start ?

    Thanks!

  2. #2

    Re:How do I tell if MySQL DB is installed?

    [quote author=blackjackguy link=board=1;threadid=10047;start=0#msg91043 date=1102475485]
    Hello, newbie here.

    From the command line, what is the *easiest* way to tell if MySQL database is installed on my linux box?

    If it is, how do I start it? Something like: service mysql start ?

    Thanks!

    [/quote]

    Hey - It depends on the distro. On certain distros, you'd do /etc/rc.d/mysqld start (for Slackware)
    /etc/init.d/mysql start (for Gentoo)

    Another way to test is to try to connect to it:

    Code:
    bash-2.05b~ mysql -u root -p 
    Password:
    mysql>
    So if I set up my root user, password, after doing mysql_install_db, then that's how I would connect to the mysql shell.

    I'd suggest using a manual of some sort to get this figured out. It'd be more helpful if you could please tell us what distribution you are using.

    HTH

    Sincerely,
    Shebang



  3. #3

    Re:How do I tell if MySQL DB is installed?

    Thanks for the tips.

    I'm using Red Hat 9.

  4. #4

    Re:How do I tell if MySQL DB is installed?

    Also, here's some more info.

    It's not currently running, according to ps -e.

    And, when I type: rpm -q mysql

    It displays mysql-3.23.etc etc

    Is this the full database, or just the mysql client software? Is there a way to tell?

    How do I start it?

    Thanks!! I know just enough about linux start screwing things up badly.. I'm trying to get away from the Microsoft platform, and it's hardest when you're just starting out.

    Thanks guys.



  5. #5

    Re:How do I tell if MySQL DB is installed?

    hello,
    i no little about sql - but you can run []brpm -ql mysql | grep init[/b] and see if anything is returned - if so then try something like /etc/init.d/mysql start

  6. #6

    Re:How do I tell if MySQL DB is installed?

    Also, I do not know whether this will work on RH9, but it works on Fedora Core 2.

    To make mysql start up automatically upon reboot, type
    Code:
    chkconfig mysql on
    As root user. Note that you may have to enter the full path to chkconfig (Red Hat is strange that way). For me it's /sbin/chkconfig mysql on. That will start the database service automatically when the OS boots.

  7. #7

    Re:How do I tell if MySQL DB is installed?

    [quote author=pbharris link=board=1;threadid=10047;start=0#msg91047 date=1102480617]
    hello,
    i no little about sql - but you can run []brpm -ql mysql | grep init[/b] and see if anything is returned - if so then try something like /etc/init.d/mysql start
    [/quote]

    Believe that should be rpm -ql mysql | grep init. Anyway if what pbharris is saying is correct and it is indeed run as a system service, then simply check for the existence of an /etc/init.d/mysql file. If it's not there, you probably don't have it installed (though your rpm query certainly indicates that you do have it installed). /etc/init.d contains scripts that start and stop OS services...they're called with "/etc/init.d/servicename start|stop|restart|a few more I dont' remember". MySQL would probably have put something in there if it ran as a service.

  8. #8

    Re:How do I tell if MySQL DB is installed?

    Second reply to myself...go me!

    I just checked the Fedora archives at http://fedora.redhat.com/ (in case you're wondering, Fedora is the continuation of Red Hat...RH9 is old as the hills by linux standards and I'd recommend you upgrade if it's possible). Fedora splits mysql into "mysql" and "mysql-server" packages, meaning Red Hat 9 probably does as well.

    Yup. Found it.

    mysql-server for RH9

    I got that from http://rpm.pbone.net/ . Add it to your bookmarks cause it's handy.

Similar Threads

  1. installed mysql and php, trying to setup phpmyadmin to no avail
    By beemer832 in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 04-15-2010, 07:34 PM
  2. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  3. FC6 Installed
    By GhostDawg in forum Redhat / Fedora
    Replies: 4
    Last Post: 02-20-2007, 03:52 AM
  4. Just Installed FC 1 on my PC
    By shebang in forum Linux - General Topics
    Replies: 5
    Last Post: 04-24-2004, 02:41 AM
  5. Installed RPM what next??
    By Gaweph in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 04-18-2004, 06:26 PM

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
  •