1753774 Members
6572 Online
108799 Solutions
New Discussion юеВ

Re: mysql setup in linux

 
Vinayak_HPUX
Frequent Advisor

mysql setup in linux

I have done setup of mysql server/client but not able to access getting as below plz help......?
[root@linuxguru.symantec.com][ /root ]mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

What to do?
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
5 REPLIES 5
Vinayak_HPUX
Frequent Advisor

Re: mysql setup in linux

Even following is not working
[root@linuxguru.symantec.com][ /root ]mysql -u linuxguru -p
Enter password:
ERROR 1045 (28000): Access denied for user 'linuxguru'@'localhost' (using password: YES)
[root@linuxguru.symantec.com][ /root ]
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Aashique
Honored Contributor

Re: mysql setup in linux

hi,
Grant the user

mysql>GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;


Thanks & Regards

Aashique
Vinayak_HPUX
Frequent Advisor

Re: mysql setup in linux

Dear I have forgotten my password .....!
now not getting mysql> prompt to execute Query ???
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Vinayak_HPUX
Frequent Advisor

Re: mysql setup in linux

Hay I got solution.............
ITS ASSUMMED THAT CLIENT/SERVER SETUP IS DONE WELL BUT FORGOT PASSWORD / NOT ABLE TO ACCESS mysql> prompt

1>kill all previous process belongs to mysql server
kill -9

2>Open 2 separate terminals login as a root and VLU [valid linux user] or sql user



ON root :
# mysqld_safe --skip-grant-tables

ON VLU :
# mysql mysql

mysql> UPDATE user SET Password=PASSWORD('redhat')WHERE Host='localhost' AND User='root';


so ur password will be "redhat"


then
login as sql user say linuxguru
and do

mysql -u root -p
passwd: redhat

u will have mysql> prompt

and enjoy



"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Vinayak_HPUX
Frequent Advisor

Re: mysql setup in linux

I got the solutions
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "