LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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: 101

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,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
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



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:30 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
Open Source Consulting | Domain Registration