Results 1 to 6 of 6

Thread: Problem installing mysql

  1. #1
    Kevin Miller NNTP User

    Default Problem installing mysql

    I'm running SUSE 10.3, and installed mysql from YaST. I started the
    mysql daemon at the command line as root. It created the mysql database
    and said to issue a couple of commands to set the root password. No
    magic there - same as it's done for the last hald dozen versions of SUSE
    that I've used. Except the 2nd line didn't work. I got the following
    error:

    koala:/var/lib # /usr/bin/mysqladmin -u root -h koala.mmc password *****
    /usr/bin/mysqladmin: connect to server at 'koala.mmc' failed
    error: 'Host 'koala.mmc' is not allowed to connect to this MySQL server'

    It never used to do that. The full output is below.

    ----------------------------------------------------------------
    koala:/var/lib # rcmysql start
    Creating MySQL privilege database...
    Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h koala.mmc password 'new-password'
    See the manual for more instructions.
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &

    You can test the MySQL daemon with mysql-test-run.pl
    cd mysql-test ; perl mysql-test-run.pl

    Please report any problems with the /usr/bin/mysqlbug script!

    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at http://shop.mysql.com
    Updating MySQL privilege database...
    Looking for 'mysql' in: /usr/bin/mysql
    Looking for 'mysqlcheck' in: /usr/bin/mysqlcheck
    Running 'mysqlcheck'...
    mysql.columns_priv OK
    mysql.db OK
    mysql.func OK
    mysql.help_category OK
    mysql.help_keyword OK
    mysql.help_relation OK
    mysql.help_topic OK
    mysql.host OK
    mysql.proc OK
    mysql.procs_priv OK
    mysql.tables_priv OK
    mysql.time_zone OK
    mysql.time_zone_leap_second OK
    mysql.time_zone_name OK
    mysql.time_zone_transition OK
    mysql.time_zone_transition_type OK
    mysql.user OK
    Running 'mysql_fix_privilege_tables'...
    OK
    Starting service MySQL done
    koala:/var/lib #
    koala:/var/lib # /usr/bin/mysqladmin -u root password *****
    koala:/var/lib # /usr/bin/mysqladmin -u root -h koala.mmc password *****
    /usr/bin/mysqladmin: connect to server at 'koala.mmc' failed
    error: 'Host 'koala.mmc' is not allowed to connect to this MySQL server'
    ----------------------------------------------------------------

    In earlier versions, starting mysql for the first time didn't print out
    the list of tables. I presume that's the output from mysqlcheck. I
    don't recall it running the mysql_fix_privilege_tables script either.
    I'm wondering if that script is what caused the 2nd command to fail, by
    setting some privilege levels in the database.

    I'm not sure if that will be problematic or not later, but it seems odd
    that I can't connect to mysql specifying the host, whereas I could in
    earlier versions. Is this now the expected behavior, and will it likely
    cause problems?

    Thanks...

    ....Kevin
    --
    Kevin Miller
    http://www.alaska.net/~atftb
    Juneau, Alaska
    Registered Linux User No: 307357, http://counter.li.org

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: Problem installing mysql

    I am puzzled by your hostname. On mine they are 'localhost' and 'linuxsite.xxxx where xxxx is a different sequence depending on the version of OpenSUSE.

    Have you tried
    Select user,host from mysql.user;

  3. #3
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Problem installing mysql

    Why are you connecting with a host at all? If you don't use it, it'll use localhost which it should.

    Remote connections per host to MySQL should never be allowed (unless explicitly required by a multi-server setup or for replication reasons)

  4. #4
    Kevin Miller NNTP User

    Default Re: Problem installing mysql

    john hudson wrote:
    > I am puzzled by your hostname. On mine they are 'localhost' and
    > 'linuxsite.xxxx where xxxx is a different sequence depending on the
    > version of OpenSUSE.


    Well, you can set your hostname to anything you want. Just edit
    /etc/HOSTNAME and /etc/hosts.

    When my sons were small they loved stuffed koalas, so when I first went
    to linux, I named the host that. It sorta stuck. The .mmc domain is a
    reference to the "Miller Men's Club" which is what me and the boys
    called our dad & kids night out. I borrowed the reference from the
    "Huxtable Men's Club" from the old Bill Cosby show.

    Since my machine is on my home network and the inside IP isn't going to
    be found in any name servers it doesn't really matter what I call it.

    I don't recall seeing the XXX sequence - my vague recollection is it
    named the host linux.localdomain or some such but it's been quite a
    while since I did an install.

    > Have you tried
    > Select user,host from mysql.user;


    Nope. But I can:
    =======================================================================
    koala:/home/mkm # mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.0.45 SUSE MySQL RPM

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select user,host from mysql.user;
    +------+-----------+
    | user | host |
    +------+-----------+
    | root | 127.0.0.1 |
    | root | koala |
    | root | localhost |
    +------+-----------+
    3 rows in set (0.01 sec)

    mysql> exti
    bye
    koala:/home/mkm # mysql -u root -p -h localhost
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.0.45 SUSE MySQL RPM

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> exit
    Bye
    koala:/home/mkm # mysql -u root -p -h koala
    Enter password:
    ERROR 1130 (00000): Host 'koala.mmc' is not allowed to connect to this
    MySQL server

    =======================================================================

    So it seems that I can get in w/no hostname, or w/localhost, but not
    with koala or koala.mmc (which koala apparently expands to).

    Maybe it's a moot point and everything will work fine. I just hate
    error messages that didn't used to happen doing the exact same thing...

    ....Kevin
    --
    Kevin Miller
    http://www.alaska.net/~atftb
    Juneau, Alaska
    Registered Linux User No: 307357, http://counter.li.org

  5. #5
    Kevin Miller NNTP User

    Default Re: Problem installing mysql

    Chrysantine wrote:
    > Why are you connecting with a host at all? If you don't use it, it'll
    > use localhost which it should.


    Well, I don't know that I actually need to. Guess I'm just trying to
    make sure that things work right from the start, rather than trying to
    troubleshoot a more complex setup down the line. "An ounce of
    prevention..." and all that.

    Thing is, earlier versions worked as advertised, and when you start
    mysql for the first time it prints out this:

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h koala.mmc password 'new-password'

    That's probably boilerplate verbiage from the mysql factory, but if
    openSUSE changed the default behavior via the mysql_fix_permissions
    script (or some other way) I would hope they'd also clean up the
    scripts. Obviously the koala.mmc isn't from the mysql folks but it's
    easily injected by the script. No magic there.


    > Remote connections per host to MySQL should never be allowed (unless
    > explicitly required by a multi-server setup or for replication reasons)


    Sure. The software I'll be using is Rivendell -
    http://www.rivendellaudio.org/ - which can be accessed over a network.
    In my case it won't be, but it does have that option.

    So maybe it's a non-issue, I don't know. I just don't like it when the
    instructions say one thing and the resulting behavior is another. It
    can be a hassle to debug applications when system settings are changed
    but not documented, especially for those of us that merely want to use
    an application, not hack it...


    ....Kevin
    --
    Kevin Miller
    http://www.alaska.net/~atftb
    Juneau, Alaska
    Registered Linux User No: 307357, http://counter.li.org

  6. #6
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: Problem installing mysql

    The problem may be that the community edition of MySQL only assumes two hostnames:

    Reading info mysql, I find:

    2.4.15.6 Securing the Initial MySQL Accounts

    'On Unix, both `root' accounts are for connections from the local host. Connections must be made from the local host by specifying a hostname of `localhost' for one of the accounts,or the actual hostname or IP number for the other.'

    There is a reference elsewhere to using mysqladmin to identify the port numbers. Perhaps you have inadvertently ended up with a host without a port or a host with a duplicate port.

    I confess this is guessing as the documentation assumes that the host has been set up and you want to connect to it; there is nothing that I can find about adding another host.

Posting Permissions

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