LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-22-2007, 01:33 AM   #16
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15

here are the messages that i get when i try to run the server daemon manually. there is some problem with hostname or something. can anyone plz tell me about it

[root@localhost ~]# /etc/rc.d/init.d/mysqld start
Initializing MySQL database: Neither host 'localhost.localdomain' nor 'localhos t' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
[FAILED]
 
Old 12-23-2007, 12:17 AM   #17
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
I am really concerned about that space character in "localhos t".

Post the results of these two commands:

hostname

cat /etc/hosts

Like this:

Code:
ken@u2:~$ hostname
u2
ken@u2:~$ cat /etc/hosts
127.0.0.1       localhost
192.168.1.2     u2.bonanza.lan  u2

192.168.1.4 ulaptop ulaptop.bonanza.lan
192.168.1.3 venus venus.bonanza.lan

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
Old 12-23-2007, 05:22 AM   #18
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
Here it is .
[root@localhost ~]# hostname
localhost.localdomain


[root@localhost ~]# cat /etc/hosts
[root@localhost ~]#

Note: space between the output of these two commands is for clarity only. its not the part of the output

Last edited by mystic_durle12; 12-23-2007 at 05:29 AM.
 
Old 12-24-2007, 10:09 AM   #19
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Quote:
Originally Posted by mystic_durle12 View Post
Here it is .
[root@localhost ~]# hostname
localhost.localdomain


[root@localhost ~]# cat /etc/hosts
[root@localhost ~]#

Note: space between the output of these two commands is for clarity only. its not the part of the output
Looks like you have an empty hosts file and that you never gave the machine its own hostname (perhaps the installer suggested localhost.localdomain and you accepted that).

As, root edit /etc/hosts and add this line:
Code:
127.0.0.1 localhost localhost.localdomain
Save the file, then as root, execute this command:
Code:
hostname localhost
See if it works now, restart mysql and try to log in to it.
 
Old 12-25-2007, 08:18 AM   #20
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
it is working. First i stopped it and then started it again and its working.
the following command tells me that its working.thanx to u.

[root@localhost ~]# chkconfig --list|grep mysqld
mysqld 0: off 1: off 2: off 3: on 4: off 5: on 6: off

but when i try to connect to it, it fails. how can i reset all the passwords previously set.

[root@localhost ~]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N O)
[root@localhost ~]# mysql -u root -password userprime
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost ~]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

and one thing more. how can i get the GUI for Mysql installed. should i get the source or the rmps from mysql site and build it?

Last edited by mystic_durle12; 12-25-2007 at 11:07 AM.
 
Old 12-25-2007, 10:39 PM   #21
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Quote:
Originally Posted by mystic_durle12 View Post
---snip---
[root@localhost ~]# mysql -u root -password userprime
you may be using the password option incorrectly, try this:
NOTE: there is no space between the -p and the password - run it together
Code:
mysql -u root -puserprime
As for a GUI, the only thing I bother with is phpMyAdmin. But it requires that you have a web server with php.

Whether you build from source or use rpm packages, you must be aware that you are purposely running outdated software.

Last edited by kzutter; 12-25-2007 at 10:42 PM.
 
Old 12-31-2007, 06:20 AM   #22
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
it is not working.I have gui tools installed and they give the same error message. Is there any way that i reset the passwords without knowing the original password.
 
Old 12-31-2007, 07:08 AM   #23
Deleriux
Member
 
Registered: Nov 2003
Posts: 89

Rep: Reputation: 17
Code:
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -uroot <<<'update mysql.user set Password=password("mynewpasshere") where User="root" and Host="localhost"'
mysqladmin shutdown
/etc/init.d/mysqld start
That should do the trick.
 
Old 01-01-2008, 09:56 PM   #24
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
it worked. Deleriux thanx a lot fellow. that was really helpful.Thank u all who contributed to my message.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB is autodetecting but when its pull out throwing error sathyguy Linux - Newbie 4 08-22-2007 07:39 AM
Shared Home Directory Throwing Error Ingla Ubuntu 6 08-06-2007 06:21 AM
SuSE YOU - throwing error neocookie Linux - Software 3 10-25-2004 02:58 PM
Qt Designer + mySql connection error vanquisher Programming 1 08-24-2004 02:21 PM
Mysql Error: Lost Connection to Mysql during query ramnath Programming 5 11-18-2003 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration