LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-21-2010, 12:12 PM   #1
yewint
Member
 
Registered: Dec 2009
Posts: 57

Rep: Reputation: 15
mysql root password


Hi geeks ,
I recently installed mysql server on fedora 10 with yum command.
"#yum install mysql-server" and sucessfully completed installation.but what is default root password?i cant access db as root. Ive already spend some time googling over the net and found some threads saying that default password is blank and to access with the following command

#mysql -u root -p

but i cant solve the problem yet. When i type above command, i am asked for password. but 'blank' is not root passwd. help me please ..

sorry if this thread is not appropriate to this forum ..

Last edited by yewint; 06-21-2010 at 12:18 PM.
 
Old 06-21-2010, 12:43 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
First thing to try is mysql -u root (without the -p option)
 
Old 06-21-2010, 12:51 PM   #3
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
I got error

# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
#
 
Old 06-21-2010, 12:58 PM   #4
gasdim
Member
 
Registered: Jun 2010
Location: Volos GREECE
Distribution: ubuntu derivative
Posts: 157

Rep: Reputation: 28
Hello
After install the mySQL autostart th service if you want

# service mysqld start

Now define the root password

# mysqladmin -u root password 'mysql_root_password'

Finally login as root and create the database

# mysql -u root -p

It should look like this
Enter password:

Kostas
 
Old 06-21-2010, 01:05 PM   #5
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
hi gasdim

I have tried that way.

# service mysqld start
Starting MySQL: [ OK ]
# mysqladmin -u root password 'rootpasswd'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
 
Old 06-21-2010, 01:10 PM   #6
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
is this command enough to install MySQL '#yum install mysql-server' . Do i need to install more packages ..?
 
Old 06-21-2010, 01:15 PM   #7
gasdim
Member
 
Registered: Jun 2010
Location: Volos GREECE
Distribution: ubuntu derivative
Posts: 157

Rep: Reputation: 28
yes you should run

# yum install mysql mysql-server

Now you must give the following command

#yum install mysql olny.

Kostas
 
Old 06-21-2010, 01:20 PM   #8
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
but i think when i install mysql-server , mysql is also installed.

'#yum install mysql' gives me the message

"Package mysql-5.0.88-1.fc10.x86_64 already installed and latest version
Nothing to do"
 
Old 06-21-2010, 01:22 PM   #9
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
#rpm -q mysql
mysql-5.0.88-1.fc10.x86_64

# rpm -q mysql-server
mysql-server-5.0.88-1.fc10.x86_64
 
Old 06-21-2010, 01:33 PM   #10
gasdim
Member
 
Registered: Jun 2010
Location: Volos GREECE
Distribution: ubuntu derivative
Posts: 157

Rep: Reputation: 28
Try this one
Edit config.inc.php this can be found in phpMyAdmin/libraries

change :

$cfg['PmaAbsoluteUri'] = '';

to

$cfg['PmaAbsoluteUri'] = 'localhost/phpmyadmin/';

change

$cfg['Servers'][$i]['host'] = 'localhost';

to

$cfg['Servers'][$i]['host'] = 'Localhost';

and enter you're password in :

$cfg['Servers'][$i]['password'] = '';

eg

$cfg['Servers'][$i]['password'] = 'password';

reboot MySQL

Kostas
 
Old 06-21-2010, 01:41 PM   #11
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
nothing's different . and I think the problem is not related with phpMyAdmin. the problem is only in MySQL server. I just need to b able to change mysql root passwd .
 
Old 06-21-2010, 01:44 PM   #12
gasdim
Member
 
Registered: Jun 2010
Location: Volos GREECE
Distribution: ubuntu derivative
Posts: 157

Rep: Reputation: 28
Personally i don't have another idea.
Try to google it thre are a lot of topics with error 1045

Kostas
 
Old 06-21-2010, 01:47 PM   #13
gasdim
Member
 
Registered: Jun 2010
Location: Volos GREECE
Distribution: ubuntu derivative
Posts: 157

Rep: Reputation: 28
I also found this article this is from a guy here

http://www.linuxquestions.org/linux/...ssword_recovey

Kostas
 
Old 06-21-2010, 04:01 PM   #14
whk
Member
 
Registered: Jun 2005
Posts: 200

Rep: Reputation: 35
mysql error

If you have an error like

ERROR 1045 (28000): Access denied

try this
mysqld_safe --skip-grant-tables --user=root &
]$ mysql -u root
mysql> flush privileges;

Peruse here for reference
http://dev.mysql.com/doc/refman/4.1/...r-options.html (mysqld options)
------------------------
hth
 
Old 06-21-2010, 04:22 PM   #15
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 131

Rep: Reputation: 20
hope this will work:
in terminal type,
mysqladmin -u root yournewpassword [press enter]
yournewpassword again,

then use mysql -u root -p then press enter:
type the password above to connect to mysql,
to see all the database ==> show databases;
to select data base ==>use dbname;
to see all the tables inside a db ==> show tables;
 
  


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 Root Password Reset carlosinfl Linux - Server 6 07-18-2008 03:58 AM
mysql root password lost nazir Linux - Software 6 10-09-2007 10:18 AM
mysql root password gabsik Linux - Networking 6 06-03-2006 10:58 AM
MySQL root password. bulzbb Linux - Newbie 2 03-11-2004 09:32 AM
Mysql root password spintrance7 Linux - Software 7 11-29-2003 04:20 PM


All times are GMT -5. The time now is 05:46 AM.

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