startup script problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    startup script problem


    Hi,

    I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.

    After reading the security section of the manual from
    http://dev.mysql.com, I added passwords for the 'root' accounts.

    However, now the startup script (/etc/rc.d/init.d/mysqld) fails.

    I tried adding:

    [mysql.server]
    password=xxx

    into /etc/my.cnf

    but it did not help.

    How/where do I set the password to for the startup script to allow
    it to run OK ?

    Thanks,
    John.

  • Aggro

    #2
    Re: startup script problem

    John wrote:
    [color=blue]
    > How/where do I set the password to for the startup script to allow
    > it to run OK ?[/color]

    I don't know what you are doing, but I have never set any passwords for
    the startup scripts. The root password needs to be used only when you
    want to login into mysql as root.

    Comment

    • John

      #3
      Re: startup script problem

      Aggro wrote:[color=blue]
      > John wrote:
      >[color=green]
      >> How/where do I set the password to for the startup script to allow
      >> it to run OK ?[/color]
      >
      >
      > I don't know what you are doing, but I have never set any passwords for
      > the startup scripts. The root password needs to be used only when you
      > want to login into mysql as root.[/color]

      I'll post '/etc/rc.d/init.d/mysqld' if that will help, but as I have
      not altered it, it should be very stanard stuff.

      So why would setting a password for the root accounts cause that script
      to fail ?

      If it helps ?

      mysql> SELECT Host, User FROM mysql.user;
      +-----------+----------+
      | Host | User |
      +-----------+----------+
      | grommet | root |
      | localhost | root |
      +-----------+----------+

      Thanks,
      John.

      Comment

      • Aggro

        #4
        Re: startup script problem

        John wrote:
        [color=blue]
        > So why would setting a password for the root accounts cause that script
        > to fail ?[/color]

        How exactly did you set the root password?

        Comment

        • John

          #5
          Re: startup script problem

          Aggro wrote:[color=blue]
          > John wrote:
          >[color=green]
          >> So why would setting a password for the root accounts cause that script
          >> to fail ?[/color]
          >
          >
          > How exactly did you set the root password?[/color]

          Either:

          shell> mysql -u root
          mysql> SET PASSWORD FOR 'root'@'localho st' = PASSWORD('newpw d');
          mysql> SET PASSWORD FOR 'root'@'grommet ' = PASSWORD('newpw d');
          mysql> FLUSH PRIVILEGES;
          mysql> exit

          or:

          shell> mysqladmin -u root password "newpwd"
          shell> mysqladmin -u root -h host_name password "newpwd"


          Would it make a difference ?

          Thanks,
          John.

          Comment

          • Aggro

            #6
            Re: startup script problem

            John wrote:
            [color=blue]
            > Would it make a difference ?[/color]

            Sorry, I have no idea why setting the password could cause the script to
            fail. I have set the password for root on both Windows and Linux
            machines and I have never experienced problems with the startup script.
            I have also never edited my.cnf for that matter. "set password" from
            mysql console has always done the trick.

            Only things that come to my mind that you could try are:
            - Reset the root password back to empty and see if it works
            - Backup your tables, uninstall mysql and then reinstall it

            Comment

            • Jesper

              #7
              Re: startup script problem

              I think there is another couse why the script does not work. Did it
              start working after removing passwords? what error messages do you
              get?

              Also have a look in the error log (usually in
              /var/lib/mysql/[SERVERNAME].err)..

              //Jesper


              John <john.walsh@min i-net.co.uk> wrote in message news:<112hbdhci e8qi88@corp.sup ernews.com>...[color=blue]
              > Hi,
              >
              > I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.
              >
              > After reading the security section of the manual from
              > http://dev.mysql.com, I added passwords for the 'root' accounts.
              >
              > However, now the startup script (/etc/rc.d/init.d/mysqld) fails.
              >
              > I tried adding:
              >
              > [mysql.server]
              > password=xxx
              >
              > into /etc/my.cnf
              >
              > but it did not help.
              >
              > How/where do I set the password to for the startup script to allow
              > it to run OK ?
              >
              > Thanks,
              > John.[/color]

              Comment

              • John

                #8
                Re: startup script problem

                Jesper,

                Yes, it starts up fine without passwords - always has.

                I don't have any error file in /var/lib/mysql/ - only the data bases.

                The only error I can see is in /var/log/messages:

                mysqld: Starting MySQL: failed

                which does not help much (I know).


                Thanks,
                John.


                Jesper wrote:[color=blue]
                > I think there is another couse why the script does not work. Did it
                > start working after removing passwords? what error messages do you
                > get?
                >
                > Also have a look in the error log (usually in
                > /var/lib/mysql/[SERVERNAME].err)..
                >
                > //Jesper
                >
                >
                > John <john.walsh@min i-net.co.uk> wrote in message news:<112hbdhci e8qi88@corp.sup ernews.com>...
                >[color=green]
                >>Hi,
                >>
                >>I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.
                >>
                >>After reading the security section of the manual from
                >>http://dev.mysql.com, I added passwords for the 'root' accounts.
                >>
                >>However, now the startup script (/etc/rc.d/init.d/mysqld) fails.
                >>
                >>I tried adding:
                >>
                >>[mysql.server]
                >>password=xx x
                >>
                >>into /etc/my.cnf
                >>
                >>but it did not help.
                >>
                >>How/where do I set the password to for the startup script to allow
                >>it to run OK ?
                >>
                >>Thanks,
                >>John.[/color][/color]

                Comment

                • Aggro

                  #9
                  Re: startup script problem

                  John wrote:
                  [color=blue]
                  > The only error I can see is in /var/log/messages:[/color]

                  I got the mysql.err file at (only root is allowed to read it in my system):

                  /var/log/mysql/mysql.err

                  You could also try to search for filenames called mysql.err, if you
                  can't find it from there.

                  Comment

                  Working...