LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 06-07-2006, 09:37 PM   #1
Ameii83
Member
 
Registered: Dec 2004
Location: malaysia
Posts: 56

Rep: Reputation: 15
Unhappy mysql administrator in linux


hi all, i got problem to create a user mysql account, when i type in the command prompt "mysql --user=root mysql" it keep saying " ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) "

Last edited by Ameii83; 06-07-2006 at 09:44 PM.
 
Old 06-07-2006, 11:25 PM   #2
phoenix49
Member
 
Registered: Jun 2005
Location: Azerbaijan/Baku
Distribution: Fedora Core 6 "Zod"
Posts: 179

Rep: Reputation: 30
Quote:
Originally Posted by Ameii83
hi all, i got problem to create a user mysql account, when i type in the command prompt "mysql --user=root mysql" it keep saying " ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) "
I think you should add password parameter (-p I guess)
 
Old 06-08-2006, 02:43 AM   #3
Ameii83
Member
 
Registered: Dec 2004
Location: malaysia
Posts: 56

Original Poster
Rep: Reputation: 15
Arrow

it ask me for the password!!i don't have it..what is the password ??" What i missing here ?. Do i forgot something! can somebody give the proper/full command line..how to get into this ??

Last edited by Ameii83; 06-08-2006 at 02:53 AM.
 
Old 06-08-2006, 02:59 AM   #4
phoenix49
Member
 
Registered: Jun 2005
Location: Azerbaijan/Baku
Distribution: Fedora Core 6 "Zod"
Posts: 179

Rep: Reputation: 30
Take a look at here:

http://stanton-finley.net/fedora_cor...tes.html#MySQL

You should create initial password for root, anyway, link above will explain everything you need to start using mysql
 
Old 06-08-2006, 03:21 AM   #5
Ameii83
Member
 
Registered: Dec 2004
Location: malaysia
Posts: 56

Original Poster
Rep: Reputation: 15
Post

It say "Access denied for user 'root'@'localhost'". Why this is happen??.This is the example that
i go through ..step by step with the link above

////////////////////////////////////////////////////////////////////////////////////////////////

[sys@xxxx ~]$ sudo su -
Password:
[root@xxxx ~]# cd /
[root@xxxx /]# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-innodb

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
~
~
~
~
~
~
~
~
"/etc/my.cnf" 15L, 357C written
[root@xxxx /]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

////////////////////////////////////////////////////////////////////////////////////////////

can you check it for me??
 
Old 06-08-2006, 03:43 AM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
What distribution are you running? Is this on a computer you setup, or is this a hosting provider or a remote machine? It appears you are running as root, so I'd guess at least that you have actual root access to this machine. In a blindingly way off attempt to get in, I'd try your root password:
mysql -u root -p

And enter your root password. Your other options are outlined on this page:
http://www.alt-php-faq.org/local/70/

HTH

Cool
 
Old 06-08-2006, 04:06 AM   #7
Ameii83
Member
 
Registered: Dec 2004
Location: malaysia
Posts: 56

Original Poster
Rep: Reputation: 15
actually.. i'm controling the remote machine. I have try "mysql -u root -p", it ask me the password and then.. i enter my root password..but it keep saying .."ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)". What it means??
 
Old 06-08-2006, 08:49 AM   #8
mat087
LQ Newbie
 
Registered: Mar 2006
Location: Montréal, Québec
Distribution: Kubuntu
Posts: 22

Rep: Reputation: 15
Use this to change your root password
Quote:
Do so:

service mysql stop

wait until MySQL shuts down. Then run

mysqld_safe --skip-grant-tables &

then you will be able to login as root with no password.

mysql -uroot mysql

In MySQL command line prompt issue the following command:

UPDATE user SET password=PASSWORD("abcd") WHERE user="root";
FLUSH PRIVILEGES;

At this time your root password is reset to "abcd" and MySQL will now
know the privileges and you'll be able to login with your new password:
Then login with your new password as you did before : "mysql -u root -p"

http://lists.mysql.com/mysql/171366


Works well for me,
Mathieu

Last edited by mat087; 06-08-2006 at 08:50 AM.
 
Old 06-08-2006, 09:25 AM   #9
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Hello, i get the same thing so i thought there was no need to start a different thread.
When i try what 'mat087' suggested i get:
Code:
root@:mysqld_safe --skip-grant-tables &
[1] 5979
root@:/var/run/mysqld# Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6040]: started
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6053]: ended
I will keep trying but can you give me any hint?

I use Ubuntu server 6.06 RC. I am connecting trough ssh. in the /etc/mysql/my.cnf i tryed both with
Code:
 bind-address          = 127.0.0.1
commented and uncommented.

Last edited by Braynid; 06-08-2006 at 09:44 AM.
 
Old 06-09-2006, 01:04 AM   #10
mat087
LQ Newbie
 
Registered: Mar 2006
Location: Montréal, Québec
Distribution: Kubuntu
Posts: 22

Rep: Reputation: 15
I really don't know what the problem could be...
Do you stop mysql server before doing anything ?
Do you have anything else running that could be in conflict with mysqld_safe ?

I don't know why you mentioned that you're connected through ssh. But just in case that it can help you, I'm connected through ssh too, and the line "bind-address = 127.0.0.1" is uncommented.


Mathieu
 
Old 06-09-2006, 03:14 PM   #11
Farrukh Fida
Member
 
Registered: Jun 2006
Location: Dubai
Distribution: Cent OS
Posts: 34

Rep: Reputation: 15
Cool

hi all
try the website
www.linuxhomenetworking.com
hope this will help u in mysql issue.
 
  


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
MySQL Administrator Meabert Linux - Software 6 06-08-2006 03:46 AM
MYSQL - Linux RPM - Administrator? lt_wentoncha Suse/Novell 1 07-04-2005 07:26 PM
mysql administrator Joe_Zhu Linux - Software 5 06-22-2005 04:55 AM
Restoring MySQL backups with mysql-administrator pnellesen Programming 0 04-25-2005 09:53 AM
How access MySQL by MySQL Administrator? treotan Linux - Newbie 5 12-04-2004 10:17 PM


All times are GMT -5. The time now is 04:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration