LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2011, 12:43 AM   #1
rahul.monap
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Help Me!


Starting mysqld daemon with databases from /var/lib/mysql
hello
i m installed mysql-5.0.77-4.el5_5.4
[root@serv ~]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@serv ~]# /etc/init.d/mysqld stop

Stopping MySQL: [ OK ]
[root@serv ~]#
[root@serv ~]# mysqld_safe --skip-grant-tables &
[1] 10995
[root@serv ~]# Starting mysqld daemon with databases from /var/lib/mysql
[root@serv ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.77 Source distribution

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

mysql> update user set password=PASSWORD("testpass") where User='root';
ERROR 1046 (3D000): No database selected
mysql> show databases
->
not showing any results so pls help me
 
Old 02-15-2011, 01:02 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello and Welcome to LinuxQuestions,

First of all, if you post a thread please use a title that describes your problem. Just 'help me' will not draw much attention. Apparently the initial database structure has not been created. Run the command:
Code:
mysql_install_db
If all goes well that should create the basic structure. To get more information about that command have a look at the man page:
Code:
man mysql_install_db
Kind regards,

Eric

Last edited by EricTRA; 02-15-2011 at 01:03 AM.
 
Old 02-15-2011, 01:07 AM   #3
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
What distribution are you using? And how did you install mysql?

Try running mysql_install_db for now and see if it creates the default database like it was supposed to when you initially started mysql.
 
Old 02-15-2011, 01:09 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by corp769 View Post
What distribution are you using? And how did you install mysql?

Try running mysql_install_db for now and see if it creates the default database like it was supposed to when you initially started mysql.
Edit: Sorry about the double post of information, I didn't see erictra's post when I clicked reply.
 
Old 02-15-2011, 02:07 AM   #5
r_s
Member
 
Registered: May 2009
Distribution: slackware, fedora, ubuntu
Posts: 98

Rep: Reputation: 21
try update mysql.user set password=PASSWORD("testpass") where User='root';
 
Old 02-15-2011, 03:47 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,089

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Quote:
mysql-5.0.77-4.el5_5.4
from that ? the operating system SHOULD be red hat or cent .But i have seen people try to install things that are not for there system .

in that case it should already be installed already BY DEFAULT
if not then use yum to install it
 
Old 02-15-2011, 07:52 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,712
Blog Entries: 27

Rep: Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055Reputation: 2055
Please use a descriptive title for your thread excluding words like 'urgent' or 'help'. Using a proper title makes it easier for members to help you. This thread has been reported for title modification. Please do not add replies that address the thread title.
 
  


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




All times are GMT -5. The time now is 08:14 PM.

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