Newbie Question: ISP-Server Setup - Ubuntu 5.10 "Breezy Badger"

Discussion in 'HOWTO-Related Questions' started by hallik, Jan 19, 2006.

  1. hallik

    hallik New Member

    Everything went ok on the install except two parts: Setting up root password for mysql and the edit of saslauthd.

    When I ran the following command:

    mysqladmin -u root password mypassword

    I get:

    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user: 'root@localhost' (Using password: NO)'

    netstat -tap shows:

    tcp 0 0 localhost.localdo:mysql *:* LISTEN 16824/mysqld

    so it seems to be working ok. I tried different variations of creating the account I found on other websites but nothing changes/works except sometimes with different commands I get:

    # mysql -u root -p
    Enter password:
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)


    And I see this at the end of my syslog, so it's telling me to set it up, but it won't let me:

    Jan 18 23:53:15 server mysqld_safe[16722]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    Jan 18 23:53:15 server mysqld_safe[16722]: To do so, start the server, then issue the following commands:
    Jan 18 23:53:15 server mysqld_safe[16722]: /usr/bin/mysqladmin -u root password 'new-password'

    Finally, running this command I get this:

    /etc/init.d/saslauthd start
    /etc/init.d/saslauthd: line 54: syntax error near unexpected token `('

    This is that section in my saslauthd:

    Code:
    # Consider our options
    case "${1}" in
      start)
            echo -n "Starting ${DESC}: "
            #dir=`dpkg-statoverride --list $PWDIR`
            test -z "$dir" || createdir $dir
            if start-stop-daemon ${START} >/dev/null 2>&1 ; then
                    echo "${NAME}."
            else
                    if start-stop-daemon --test ${START} >/dev/null 2>&1; then
                            echo "(failed)."     <----Line 54
                            exit 1
                    else
                            echo "${DAEMON} already running."
                            exit 0
                    fi
            fi
            ;;
      stop)
    Ideas?
    thank you for any help.

    <edit> I do have to say as far as the second question, the test display the exact results as the screenshot in the HOW-TO, so it may not be an issue. This is also a fresh install on a test server.
     
    Last edited: Jan 19, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    You seem to have set another MySQL password before. To use another password, you can try this:
    Code:
    mysqladmin -u root -p<current_password> password <new_password>
    Note: There's no space between -p and <current_password>!


    Strange... :confused: You could try to replace
    Code:
    echo "(failed)."
    with
    Code:
    echo '(failed).'
     
  3. hallik

    hallik New Member

    I don't remember doing that at all. I tried doing a apt-get remove mysql-server mysql-client libmysqlclient12-dev

    and then apt-get install mysql-server mysql-client libmysqlclient12-dev

    Then attempting that set password again with the same results. Any certain config files I should delete after I remove them to make it a clean install?


    Had to change line 70 & 73 as they got the same errors when i made the changes you suggested, then got:

    /etc/init.d/saslauthd: line 83: unexpected EOF while looking for matching `"'

    Here's line 70 & 73 (lines with single ticks)

    Code:
     if start-stop-daemon --test ${START} >/dev/null 2>&1; then
                            echo '(not running).'
                            exit 0
                    else
                            echo '(failed).'
                            exit 1
                    fi
    edit: line 83

    echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
     
  4. hallik

    hallik New Member

    OK since I didn't really have anything installed, I formatted and went again. This time when I did the apt-get install on those 3 packages, this is what it gave me, and it made me do a postfix setup. Last time I did for an internet site, this time i did no configuration and it worked. I am using the same password for users, root, anything really since this is a test server. But I wonder if something has changed in required stuff for mysql since the tutorial was written?


    The following extra packages will be installed:
    libdbd-mysql-perl libdbi-perl liblockfile1 libmysqlclient12 libmysqlclient14 libnet-daemon-perl
    libplrpc-perl mailx mysql-common postfix
    Suggested packages:
    dbishell mysql-doc procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre
    Recommended packages:
    libmysqlclient14-dev resolvconf
    The following NEW packages will be installed:
    libdbd-mysql-perl libdbi-perl liblockfile1 libmysqlclient12 libmysqlclient12-dev libmysqlclient14
    libnet-daemon-perl libplrpc-perl mailx mysql-client mysql-common mysql-server postfix

    Anyways, both problems seem to be fixed. I found the missing "

    :)
     
    Last edited: Jan 19, 2006
  5. falko

    falko Super Moderator ISPConfig Developer

    No, I don't think so. Maybe you made a typo somewhere when you followed the tutorial?
     
  6. anystupidasssname

    anystupidasssname New Member

    Possible solutions - I experienced exactly the same problems?!?

    Interesting that I should run into exactly the same two problems as this guy:
    http://www.howtoforge.com/forums/archive/index.php/t-2148.html
    These are the instructions I was following: http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p5

    These were the solutions for me:

    Problem:
    Solution:
    It seems the root password was either already set (I don't recall setting it) or got set by the mysqladmin commands ever though errors were returned. I was able to confirm I could login using the alternate command:
    Problem:
    Solution:
    I had neglected to close the quotes when I changed the path after
    (don't ask me why it says the syntax error is on line 53...)
    Hope this helps somebody.
     

Share This Page