Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

What Is Mysql's Default Root Password?


11 replies to this topic

#1 michaelper22

    -=Hybrid Bus=-

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 742 posts
  • Gender:Male
  • Location:My hybrid bus (in NYC), a computer
  • Interests:Not interested in anything
  • Spam Patrol

Posted 29 December 2005 - 12:56 AM

I installed SuSE Linux 9.1 Professional on an old computer recently. I installed MySQL server (version 4.0.18), Webmin (version 1.250) and Usermin (version 1.180). If I try to connect to the MySQL server with the username root and no password, I get an invalid login error from Webmin, Usermin and mysql-cc. What is the default password, and how can I change it? I am very excited to be learning Linux (after a long journey through Windows-land), but get frustrated on loopholes like these.
Also, an a different note, why would the system stop loading after a certain point (towards the end, don't remeber where) if I have my USB drive plugged in before booting?

#2 jlhaslip

    Insert Custom Title Here

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,040 posts
  • Gender:Not Telling
  • Location:Linux, DOS and Windows…the good, the bad and the ugly
  • myCENT:81.07
  • Spam Patrol

Posted 29 December 2005 - 02:47 AM

The initial Mysql password is blank according to this info for mysql ver 5.0. YOU WILL HAVE TO READ THE MANUAL FOR YOUR SPECIFIC VERSION. One of the first things they reccomend is to set a new root password and run the Grant table which controls access to the Database.

Quote

After a fresh installation, you should connect to the server and set up your users and their access permissions:

shell> mysql -u root mysql
The server should let you connect because the MySQL root user has no password initially. That is also a security risk, so setting the password for the root accounts is something you should do while you're setting up your other MySQL users. For instructions on setting the initial passwords, see Section 2.9.3, “Securing the Initial MySQL Accounts”.

The manuals are available at mysql.com either for online reading or by downloading. If you have installed it locally, probably best to download it.

Hope this helps.

#3 OpaQue

    Administrator

  • Admin - The Official Guru
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,895 posts
  • Gender:Male
  • Location:Somewhere in Time & Space.
  • Interests:Discovering Myself.
  • myCENT:-129.97

Posted 29 December 2005 - 10:14 AM

Try "su" as username and password is "" (blank).

#4 Inspiron

    Trap Grand Marshal Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,204 posts

Posted 29 December 2005 - 02:43 PM

I'm not sure about MySQL but I guess you can get some references here..
http://dev.mysql.com...rd-hashing.html
http://www.experts-exchange.com/Databases/...Q_20678779.html

#5 leiaah

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 436 posts
  • Location:Koronadal City, Philippines
  • Interests:music, web stuff, movies, pop culture

Posted 29 December 2005 - 06:25 PM

The default user is root and the password is, as they say blank for default.

You can set the root password by typing this:
# mysqladmin -u root password 'new-password'

You can then login by typing this:
# mysql -u root –p 
Then you'll be prompted to provide the password you specified earlier.

You also might want to delete the anonymous user in the User's table. The default configuration of MySQL allows any user access to the system without
providing a username or password.

Delete the user by typing this:
# mysql -u root –p
mysql> use mysql
mysql> delete from user where User='';
mysql> quit


#6 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 25 October 2007 - 01:48 PM

I've changed the password with:

mysqladmin -you root password foo

When I run:

mysql -you root �p and enter foo when prompted, I get:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Ideas?

#7 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 24 May 2008 - 08:58 AM

how to establish mysql database connection with php code
What Is Mysql's Default Root Password?

Hi,I have installed easy php1.8 on to my system and I created a database and tables in it.I'm trying to send the form data written in html to my database using php code.I'm getting errors like

Access denied for user@localhost using password (yes)

Here I didnt used any username or password or it was not asked during installation.So,because of the above error I'm unable to connect to the database.Hence I'm unable to send the form data tomy database table.I dontknow whether there may be any default passwords or not.

Please help me out

#8 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 28 May 2008 - 03:56 PM

Same problem with my mysql installation
What Is Mysql's Default Root Password?

Replying to Trap FeedBacker

Even I just installed my mysql. It dint prompt for any password when it was installed nor did the blank password work. It returs with the same error when I try to open sql or try to change the password... Any help?

-reply by Rajaram

#9 Framp

    Newbie [Level 2]

  • Kontributors
  • PipPip
  • 39 posts

Posted 13 June 2008 - 08:01 PM

Try stopping the mysql daemon
/etc/init.d/mysql stop
Run
mysqld_safe --skip-grant-tables &
Enter as root
mysql -u root -p

To change root password
mysql client - mysql -u root
and write
use mysql
 update user set password=PASSWORD(”NEW-ROOT-PASSWORD”) where User=’root’;


#10 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 03 September 2008 - 04:20 AM

Yes!!!
What Is Mysql's Default Root Password?

Replying to Framp
Dude I've been searching for an answer ALL DAY LONG! Thank you so much this helped tons!

-reply by Drew




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users