Re: change pw

2008-03-04 Thread Hiep Nguyen

On Mon, 3 Mar 2008, Daniel Brown wrote:


On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:


 mysql select user,host,password from mysql.user;
 +--+--+--+
 | user | host | password |
 +--+--+--+
 | root | localhost|  |
 | root | dev.jss.com  |  |
 |  | dev.jss.com  |  |
 |  | localhost|  |
 +--+--+--+
 4 rows in set (0.00 sec)


   Okay, I wasn't aware that it's all on the same server.  Try this:

   USE mysql;
   UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE
User='root' AND host='dev.jss.com' LIMIT 1;
   FLUSH PRIVILEGES;

do i have to worry about those don't have user name?  what are they use 
for?  should i delete them???


t. hiep

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-04 Thread Dan Rogart
You should definitely consider getting rid of them, otherwise people can log
in to MySQL from any host with no credentials.

They are created during installation by the mysql_install_db script.

This tells you how to remove them:
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

-Dan


On 3/4/08 7:23 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:

 On Mon, 3 Mar 2008, Daniel Brown wrote:
 
 On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
 
  mysql select user,host,password from mysql.user;
  +--+--+--+
  | user | host | password |
  +--+--+--+
  | root | localhost|  |
  | root | dev.jss.com  |  |
  |  | dev.jss.com  |  |
  |  | localhost|  |
  +--+--+--+
  4 rows in set (0.00 sec)
 
Okay, I wasn't aware that it's all on the same server.  Try this:
 
USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE
 User='root' AND host='dev.jss.com' LIMIT 1;
FLUSH PRIVILEGES;
 
 do i have to worry about those don't have user name?  what are they use
 for?  should i delete them???
 
 t. hiep


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-04 Thread Hiep Nguyen

On Tue, 4 Mar 2008, Dan Rogart wrote:


You should definitely consider getting rid of them, otherwise people can log
in to MySQL from any host with no credentials.

They are created during installation by the mysql_install_db script.

This tells you how to remove them:
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html


i followed the instruction and typed:
mysql DROP USER '';
ERROR 1396 (HY000): Operation DROP USER failed for ''@'%'
mysql DROP USER ''@'localhost';
Query OK, 0 rows affected (0.00 sec)

and
mysql DROP USER ''@'localhost';
ERROR 1396 (HY000): Operation DROP USER failed for ''@'localhost'

what's wrong here???
t. hiep

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-04 Thread Dan Rogart
That error occurs when the user has already been dropped - so it's good news
:).

You can check for users with blank user names and/or blank passwords by
querying the mysql.user table:

select user,host,password from mysql.user where user = '' or password = '';

Those are the users you should consider dropping or assigning passwords to.

Hope that helps,

Dan


On 3/4/08 9:57 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:

 On Tue, 4 Mar 2008, Dan Rogart wrote:
 
 You should definitely consider getting rid of them, otherwise people can log
 in to MySQL from any host with no credentials.
 
 They are created during installation by the mysql_install_db script.
 
 This tells you how to remove them:
 http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
 
 i followed the instruction and typed:
 mysql DROP USER '';
 ERROR 1396 (HY000): Operation DROP USER failed for ''@'%'
 mysql DROP USER ''@'localhost';
 Query OK, 0 rows affected (0.00 sec)
 
 and
 mysql DROP USER ''@'localhost';
 ERROR 1396 (HY000): Operation DROP USER failed for ''@'localhost'
 
 what's wrong here???
 t. hiep


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-04 Thread Hiep Nguyen

got it. thanks.

t. hiep

On Tue, 4 Mar 2008, Dan Rogart wrote:


That error occurs when the user has already been dropped - so it's good news
:).

You can check for users with blank user names and/or blank passwords by
querying the mysql.user table:

select user,host,password from mysql.user where user = '' or password = '';

Those are the users you should consider dropping or assigning passwords to.

Hope that helps,

Dan


On 3/4/08 9:57 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:


On Tue, 4 Mar 2008, Dan Rogart wrote:


You should definitely consider getting rid of them, otherwise people can log
in to MySQL from any host with no credentials.

They are created during installation by the mysql_install_db script.

This tells you how to remove them:
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html


i followed the instruction and typed:
mysql DROP USER '';
ERROR 1396 (HY000): Operation DROP USER failed for ''@'%'
mysql DROP USER ''@'localhost';
Query OK, 0 rows affected (0.00 sec)

and
mysql DROP USER ''@'localhost';
ERROR 1396 (HY000): Operation DROP USER failed for ''@'localhost'

what's wrong here???
t. hiep





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



change pw

2008-03-03 Thread Hiep Nguyen

hi all, i just installed mysql and started mysqld.

it suggested i change pw for root, so i did:
mysqladmin -u root password my_pw;

but i can't do:
mysqladmin -u root -h dev.jss.com password my_pw;

how do i change pw for [EMAIL PROTECTED]

thanks,
t. hiep

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-03 Thread Daniel Brown
On Mon, Mar 3, 2008 at 2:01 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
 hi all, i just installed mysql and started mysqld.

  it suggested i change pw for root, so i did:
  mysqladmin -u root password my_pw;

  but i can't do:
  mysqladmin -u root -h dev.jss.com password my_pw;

  how do i change pw for [EMAIL PROTECTED]

Quickly STFW'ing/RTFM'ing would give you an answer.

One way is to log into the remote host (dev.jss.com) via SSH as
root (or use a control panel such as cPanel).

Another is to use the MySQL client and log in remotely as such:

mysql -h dev.jss.com -u root -p
(Enter the MySQL root password)

Then type the following MySQL queries:

USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
FLUSH PRIVILEGES;

Just be sure to replace 'newpwd' with the password you want to
use.  MySQL's PASSWORD() function will handle hashing the password, so
don't send it encrypted or pre-hashed.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-03 Thread Hiep Nguyen

On Mon, 3 Mar 2008, Daniel Brown wrote:


On Mon, Mar 3, 2008 at 2:01 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:

hi all, i just installed mysql and started mysqld.

 it suggested i change pw for root, so i did:
 mysqladmin -u root password my_pw;

 but i can't do:
 mysqladmin -u root -h dev.jss.com password my_pw;

 how do i change pw for [EMAIL PROTECTED]


   Quickly STFW'ing/RTFM'ing would give you an answer.

   One way is to log into the remote host (dev.jss.com) via SSH as
root (or use a control panel such as cPanel).

   Another is to use the MySQL client and log in remotely as such:

   mysql -h dev.jss.com -u root -p
   (Enter the MySQL root password)

   Then type the following MySQL queries:

   USE mysql;
   UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
   FLUSH PRIVILEGES;

   Just be sure to replace 'newpwd' with the password you want to
use.  MySQL's PASSWORD() function will handle hashing the password, so
don't send it encrypted or pre-hashed.



mysql select user,host,password from mysql.user;
+--+--+--+
| user | host | password |
+--+--+--+
| root | localhost|  |
| root | dev.jss.com  |  |
|  | dev.jss.com  |  |
|  | localhost|  |
+--+--+--+
4 rows in set (0.00 sec)

i have no problem set password for [EMAIL PROTECTED], but for some reason i 
can't set a password for [EMAIL PROTECTED]


is there any security issue not to set password for [EMAIL PROTECTED] 
what about these two:

''@'localhost'  ''@'dev.jss.com'

thanks,
t. hiep

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-03 Thread Daniel Brown
On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:

  mysql select user,host,password from mysql.user;
  +--+--+--+
  | user | host | password |
  +--+--+--+
  | root | localhost|  |
  | root | dev.jss.com  |  |
  |  | dev.jss.com  |  |
  |  | localhost|  |
  +--+--+--+
  4 rows in set (0.00 sec)

Okay, I wasn't aware that it's all on the same server.  Try this:

USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE
User='root' AND host='dev.jss.com' LIMIT 1;
FLUSH PRIVILEGES;

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]