HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Newbie Question: ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" (http://www.howtoforge.com/forums/showthread.php?t=2148)

hallik 19th January 2006 08:19

Newbie Question: ISP-Server Setup - Ubuntu 5.10 "Breezy Badger"
 
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.

falko 19th January 2006 09:07

Quote:

Originally Posted by hallik
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)'

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>!


Quote:

Originally Posted by hallik
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.

Strange... :confused: You could try to replace
Code:

echo "(failed)."
with
Code:

echo '(failed).'

hallik 19th January 2006 09:14

Quote:

Originally Posted by falko
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>!

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?


Quote:

Strange... :confused: You could try to replace
Code:

echo "(failed)."
with
Code:

echo '(failed).'

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

hallik 19th January 2006 11:05

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 "

:)

falko 19th January 2006 16:22

Quote:

Originally Posted by hallik
But I wonder if something has changed in required stuff for mysql since the tutorial was written?

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

anystupidasssname 7th June 2006 22:51

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/arc...hp/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:
Quote:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
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:
Quote:

mysql -uroot -prootpassword
Problem:
Quote:

/etc/init.d/saslauthd start
/etc/init.d/saslauthd: line 54: syntax error near unexpected token `('
Solution:
I had neglected to close the quotes when I changed the path after
Quote:

PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
(don't ask me why it says the syntax error is on line 53...)
Hope this helps somebody.


All times are GMT +2. The time now is 10:30.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.