LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help Me! (https://www.linuxquestions.org/questions/linux-newbie-8/help-me-862739/)

rahul.monap 02-15-2011 12:43 AM

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

EricTRA 02-15-2011 01:02 AM

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

corp769 02-15-2011 01:07 AM

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.

corp769 02-15-2011 01:09 AM

Quote:

Originally Posted by corp769 (Post 4258662)
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.

r_s 02-15-2011 02:07 AM

try update mysql.user set password=PASSWORD("testpass") where User='root';

John VV 02-15-2011 03:47 AM

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

onebuck 02-15-2011 07:52 AM

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.


All times are GMT -5. The time now is 08:45 AM.