Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> What Is Mysql's Default Root Password?, Just installed in on my Linux box
michaelper22
post Dec 29 2005, 12:56 AM
Post #1


-=Hybrid Bus=-
*********

Group: Members
Posts: 742
Joined: 2-November 05
From: My hybrid bus (in NYC), a computer
Member No.: 13,709
Spam Patrol



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?
Go to the top of the page
 
+Quote Post
jlhaslip
post Dec 29 2005, 02:47 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,071
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
OpaQue
post Dec 29 2005, 10:14 AM
Post #3


Administrator
Group Icon

Group: Admin
Posts: 1,479
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1



Try "su" as username and password is "" (blank).
Go to the top of the page
 
+Quote Post
Inspiron
post Dec 29 2005, 02:43 PM
Post #4


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,203
Joined: 25-March 05
Member No.: 4,883



I'm not sure about MySQL but I guess you can get some references here..
http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html
http://www.experts-exchange.com/Databases/...Q_20678779.html
Go to the top of the page
 
+Quote Post
leiaah
post Dec 29 2005, 06:25 PM
Post #5


Super Member
*********

Group: Members
Posts: 436
Joined: 21-January 05
From: Koronadal City, Philippines
Member No.: 3,358



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

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


You can then login by typing this:
CODE
# 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:
CODE
# mysql -u root –p
mysql> use mysql
mysql> delete from user where User='';
mysql> quit
Go to the top of the page
 
+Quote Post
iGuest
post Oct 25 2007, 01:48 PM
Post #6


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



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?
Go to the top of the page
 
+Quote Post
iGuest
post May 24 2008, 08:58 AM
Post #7


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



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
Go to the top of the page
 
+Quote Post
iGuest
post May 28 2008, 03:56 PM
Post #8


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



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
Go to the top of the page
 
+Quote Post
Framp
post Jun 13 2008, 08:01 PM
Post #9


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 39
Joined: 26-May 08
Member No.: 62,700



Try stopping the mysql daemon
CODE
/etc/init.d/mysql stop

Run
CODE
mysqld_safe --skip-grant-tables &

Enter as root
CODE
mysql -u root -p


To change root password
CODE
mysql client - mysql -u root

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