Hi
Ok, having sorted out my scripts, I'm understanding the concepts of Mqsql quite well,
however, before i got too far into creating and manipulating data I want to understand
the security issues. I run the mysql server on a win2K box and use the client from
the same machine, therefore I can just type mysql at the c:\ and in I go.
I have another pc which is networked so a great opportunity to try out the security.
PROBLEM!
I can't seem to get access rights set up or indeed users.
below is what happens when I try to grant access to me on my machine rather than just
type in mysql.
mysql thinks I am called administrator, and my host name is sara (as shown in
mysqlwinadmin)
C:\>mysql grant all on *.* to administrator@sara identified by "delboy"
When I type in the statement to grant access it throws out the following text:
"MYSQL Ver 9.23 Distrib 3.22.7b-beta, for pc-cygwin32 (i386)
By TCX Datakonsult AB, by Monty
This software comes with ABSOLUTELY NO WARRANTY.
Usage: MYSQL [OPTIONS] [database]
-A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to
get table and field completion. This gives a quicker
start of mysql.
-B, --batch Print results with a tab as separator, each row on
a new line. Doesn't use history file
-C, --compress Use compression in server/client protocol
-#, --debug=... Output debug log. Often this is 'd:t:o,filename`
-T, --debug-info Print some debug info at exit
-e, --execute=... Execute command and quit.(--batch is implicit)
-f, --force Continue even if we get an sql error.
-?, --help Display this help and exit
-h, --host=... Connect to host
-n, --unbuffered Flush buffer after each query
-O, --set-variable var=option
Give a variable an value. --help lists variables
-o, --one-database Only update the default database. This is useful
for skipping updates to other database in the update
log.
-p[password], --password[=...]
Password to use when connecting to server
If password is not given it's asked from the tty.
-P --port=... Port number to use for connection
-q, --quick Don't cache result, print it row by row. This may
slow down the server if the output is suspended.
Doesn't use history file
-r, --raw Write fields without conversion. Used with --batch
-s, --silent Be more silent.
-L, --skip-line-numbers Don't write line number for errors
-S --socket=... Socket file to use for connection
-t --table=... Output in table format
-u, --user=# User for login if not current user
-v, --verbose Write more (-v -v -v gives the table output format)
-V, --version Output version information and exit
-E, --vertical Print the output of a query (rows) vertically
-w, --wait Wait and retry if connection is down
Possible variables for option --set-variable (-O) are:
max_allowed_packet current value: 25165824l
net_buffer_length current value: 16384l
C:\>mysql -h sara -u administrator -p
Enter password: ******
ERROR 1045: Access denied for user: 'administrator@sara' (Using password: YES)"
When I try to then login in to mysql as administrator (my win2k login name) which
mysql thinks is the root it says access denied.
If I try to update me (administrator as a user by execuiting the following command it
won't accept it either, but I may be misunderstanding the syntax here?
c:\> mysql -root mysql update users set password=password"delboy" where user=root
two things here, if when I try to login as root it thinks I'm administrator should I
be substituting root for administrator and is the password syntax correct? Im not
sure if one substitutes the second password statement for "mypassword"
Sorry this is so long, but I would like to get my thinking straight on here so that I
can access the server on this machine from my other one. But with the grant access
statements not working it will let me connect to the server but won't understandably
allow me access to the db!
In anticipation
Regards
Sara