473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Strange looking mysql.user table

My MySQL.user table (user, host, password) looks like the following:

+---------+-----------+---------------------+
| user | host | password |
+---------+-----------+---------------------+
| root | localhost | |
| root | % | |
| | localhost | 3823a5ee1f831626 |
| | % | |
| jim | % | 426d920b373a5e5b |
+---------+-----------+---------------------+

This looks strange to me.
1) two entries for root
2) two blank entries.
3) is jim's host correct?

This is on a private, standalone system for MySQL/PHP learning purposes.

If this is strange, should I remove any of these entries using SQL "Delete
From"

Thank you...

Bruce
Jul 17 '05 #1
4 1857
I noticed that Message-ID: <40********@news1.prserv.net> from Bruce A.
Julseth contained the following:

If this is strange, should I remove any of these entries using SQL "Delete
From"


Nothing strange about it if it is a single table with no primary key.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
Bruce A. Julseth wrote:
My MySQL.user table (user, host, password) looks like the following:

+---------+-----------+---------------------+
| user | host | password |
+---------+-----------+---------------------+
| root | localhost | |
| root | % | |
| | localhost | 3823a5ee1f831626 |
| | % | |
| jim | % | 426d920b373a5e5b |
+---------+-----------+---------------------+

This looks strange to me.
1) two entries for root
2) two blank entries.
3) is jim's host correct?

This is on a private, standalone system for MySQL/PHP learning purposes.

If this is strange, should I remove any of these entries using SQL "Delete
From"

Thank you...

Bruce


the "%"-sign says to allow a user named root to access the database from
any host. Jim and "" can also access it from any host with a MySQL
client.

<nobody> on local host can access it with or without a password. I
would probably remove both of these entries for security purposes and
you really can't have a '' username.

to see if the name is actually '' or if it contains spaces you can do
something like:

select length(user),user,host from user;

then
delete from user where user='' and (host = "%" or host = 'localhost');
and insert the proper number of spaces.

Michael Austin.
Jul 17 '05 #3

"Michael Austin" <ma*****@firstdbasource.com> wrote in message
news:OB******************@newssvr24.news.prodigy.c om...
Bruce A. Julseth wrote:
My MySQL.user table (user, host, password) looks like the following:

+---------+-----------+---------------------+
| user | host | password |
+---------+-----------+---------------------+
| root | localhost | |
| root | % | |
| | localhost | 3823a5ee1f831626 |
| | % | |
| jim | % | 426d920b373a5e5b |
+---------+-----------+---------------------+

This looks strange to me.
1) two entries for root
2) two blank entries.
3) is jim's host correct?

This is on a private, standalone system for MySQL/PHP learning purposes.

If this is strange, should I remove any of these entries using SQL "Delete From"

Thank you...

Bruce
the "%"-sign says to allow a user named root to access the database from
any host. Jim and "" can also access it from any host with a MySQL
client.

<nobody> on local host can access it with or without a password. I
would probably remove both of these entries for security purposes and
you really can't have a '' username.


So, I should remove the entries that have no user name. If I can't have a ''
user name, where is anonymous in my table? What does anonymous look like?

to see if the name is actually '' or if it contains spaces you can do
something like:

select length(user),user,host from user;

then
delete from user where user='' and (host = "%" or host = 'localhost');
and insert the proper number of spaces.
These user names were truly blank. I already did a select to see if I could
find them so your delete statement will work with ''.

Thanks for the help..

Michael Austin.

Jul 17 '05 #4
Bruce A. Julseth wrote:
"Michael Austin" <ma*****@firstdbasource.com> wrote in message
news:OB******************@newssvr24.news.prodigy.c om...
Bruce A. Julseth wrote:

My MySQL.user table (user, host, password) looks like the following:

+---------+-----------+---------------------+
| user | host | password |
+---------+-----------+---------------------+
| root | localhost | |
| root | % | |
| | localhost | 3823a5ee1f831626 |
| | % | |
| jim | % | 426d920b373a5e5b |
+---------+-----------+---------------------+

This looks strange to me.
1) two entries for root
2) two blank entries.
3) is jim's host correct?

This is on a private, standalone system for MySQL/PHP learning purposes.

If this is strange, should I remove any of these entries using SQL
"Delete
From"

Thank you...

Bruce


the "%"-sign says to allow a user named root to access the database from
any host. Jim and "" can also access it from any host with a MySQL
client.

<nobody> on local host can access it with or without a password. I
would probably remove both of these entries for security purposes and
you really can't have a '' username.

So, I should remove the entries that have no user name. If I can't have a ''
user name, where is anonymous in my table? What does anonymous look like?


user = "%" and host = "%" !! very dangerous I might add...
says anyone can connect without a password from any host.

user = "%" and host = "localhost" !! safer. all users on localhost
any user on "this" host can connect.

<snip>

Michael Austin.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Google Mike | last post by:
I have RH9 and am using the PHP and MySQL that came with it. I was doing fine with all manner of my web pages for this app until I started having this very strange problem. It's a work order...
22
by: Martin MOKREJ© | last post by:
Hi, I'm looking for some easy way to do something like include in c or PHP. Imagine I would like to have: cat somefile.py a = 222 b = 111 c = 9
0
by: Neculai Macarie | last post by:
Hi! Using Union and Order By gives strange behaviour in the following test-case: drop table if exists gallery; drop table if exists gallery_categ; # create test tables create table gallery...
0
by: Nedelcho Stanev | last post by:
Hello All, I have strange problem with libodbc++ ( 0.2.3 or 0.2.2 ). i'm using mysql-4.0.14 , MyODBC-3.51.06 and unixODBC-2.2.6 configured with following options 1.MySQL ../configure...
0
by: Soefara | last post by:
Dear Sirs, I am experiencing strange results when trying to optimize a LEFT JOIN on 3 tables using MySQL. Given 3 tables A, B, C such as the following: create table A ( uniqueId int not...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.