Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th January 2006, 08:19
hallik hallik is offline
Junior Member
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Angry 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.

Last edited by hallik; 19th January 2006 at 08:33.
Reply With Quote
Sponsored Links
  #2  
Old 19th January 2006, 09:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

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... You could try to replace
Code:
echo "(failed)."
with
Code:
echo '(failed).'
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 19th January 2006, 09:14
hallik hallik is offline
Junior Member
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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... 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
Reply With Quote
  #4  
Old 19th January 2006, 11:05
hallik hallik is offline
Junior Member
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 by hallik; 19th January 2006 at 11:18.
Reply With Quote
  #5  
Old 19th January 2006, 16:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

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?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 7th June 2006, 22:51
anystupidasssname anystupidasssname is offline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default 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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA (Domaincontroller) Server For Small Workgroups With Ubuntu 5.10 Dagur Server Operation 15 16th February 2006 04:56
Logging on to an ubuntu server DMJ HOWTO-Related Questions 3 8th January 2006 01:24
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 11:01
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 03:30
ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" & PHP Brenton HOWTO-Related Questions 2 19th October 2005 20:03


All times are GMT +2. The time now is 05:17.


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