Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-31-2006, 08:27 AM
|
#1
|
|
Member
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 532
Rep:
|
mysql root password
I'm a begginner in mysql .I'm trying to password it and this is what i was doing:
Quote:
mysql> UPDATE user SET Password = password('p4ssw0rd')WHERE User = ('root');
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> quit
Bye
root@mail:~# mysql -u root -p ga8r13l3
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
root@mail:~# mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
|
What is the correct way ???
Thanks !!!!
Last edited by gabsik; 05-31-2006 at 08:29 AM.
|
|
|
|
05-31-2006, 08:36 AM
|
#2
|
|
Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
I don't think you want parentheses around root - ie
UPDATE user SET Password=PASSWORD('passwd') WHERE User='root';
ps gabsik - why are you and I always on the same threads?
Last edited by billymayday; 05-31-2006 at 08:44 AM.
|
|
|
|
05-31-2006, 08:49 AM
|
#3
|
|
Member
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 532
Original Poster
Rep:
|
Mysql is not a networking issue ?
I don't understand your question ... thanks anyway !!!!
Last edited by gabsik; 05-31-2006 at 09:19 AM.
|
|
|
|
05-31-2006, 08:53 AM
|
#4
|
|
Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
I don't get your first line - what's networking got to do with it?
On the second point, I was refering to you port redirection issue, and I noticed we were both answering something else
|
|
|
|
05-31-2006, 09:18 AM
|
#5
|
|
Member
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 532
Original Poster
Rep:
|
Missunderstandings do happen , pardon !
Mysql allows access with no password:
Quote:
root@mail:~# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 4.0.24_Debian-10sarge1-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> quit
Bye
root@mail:~# mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
|
... denyes when i enter the one i previously succesfully set !
Quote:
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> UPDATE user SET Password=PASSWORD('password')WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0
|
Last edited by gabsik; 05-31-2006 at 09:24 AM.
|
|
|
|
05-31-2006, 09:29 AM
|
#6
|
|
Member
Registered: Sep 2003
Location: Toronto, Canada
Distribution: FreeBSD
Posts: 78
Rep:
|
From the reference manual the correct way to set your passwords are
Code:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
If you forgot your password shutdown mysqld then run
Code:
mysqld_safe --skip-grant-tables &
You should now be able to login without a password. In the MySQL command line prompt type the following to update your passwords.
Code:
mysql> UPDATE user SET password=PASSWORD('newpass') WHERE user="root" AND hostname="localhost";
mysql> FLUSH PRIVILEGES;
You can also use the mysqladmin command mysqladmin -h hostname -u user password 'new password'
|
|
|
|
06-03-2006, 10:58 AM
|
#7
|
|
Member
Registered: Dec 2005
Location: italia
Distribution: Debian etch stable
Posts: 532
Original Poster
Rep:
|
Thanks !!!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:55 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|