[Noplug] MySQL expert?
John W. Baxter
jwblist at olympus.net
Sun Mar 13 18:17:07 PST 2005
On 3/13/2005 9:17, "Lewis Coleman" <Coleman at tscnet.com> wrote:
> I have a book on MySQL that I will bring Monday.
>
> Queries are easy--just standard SQL language:
> run mysql with the -p=password option and the name of the database (You
> need to know the password and database name, of course and must be able
> to access the database.)
The above assumes that the running username has the needed capabilities in
the MySQL database and the database is local and no one hacks the Linux
user's bash_history file. And it writes the password into the users
bash_history file (or other shell equivalent).
a. -u username will specify the MySQL user if needed.
c. -p without a password will prompt for the password in the usual
hidden way.
b. -h FQDN or -h ip-address will use the proper machine if the data base
isn't local.
c. -p without a password will prompt for the password in the usual
hidden way.
"Just standard SQL language" isn't easy if one doesn't know SQL. And MySQL
does have extensions to standard SQL (which one might avoid in scripts if
one might switch engines).
> type the SQL command
> SELECT * FROM table_name; (as an example and don't forget the
> semicolon--I always do!!)
> this will output everything in table_name (which again you must know)
You don't need to know...you can type
show tables;
(If you don't even know the database name, you can get started with
show databases;
You can learn the column names (and types) with
explain table-name;
>
> That is the easy part--how to create the database and find info about
> it is a little harder as is writing a program to access the database.
> The really hard part (at least to me) is the security part (being able
> to access the database, but not let the "bad guys" in.)
GRANT (and REVOKE) are among the annoyingly complex aspects of SQL. I have
to look them up whenever I use them. (But then, I spent about 8 years
having to look up the ln command in order to get the parameters in the right
order.)
But they do give lots of control. In a table with columns a, b, and c, it's
entirely normal to give user john read and update access to column a, read
access to column b, and no useful access to column c. In an organization
(or if john tends to be as careless as this john), one might well do that.
You can even let john do more if he's on the machine running the database
than on some other machine (or a particular other machine, and no access at
all from others, or different access from different other machines). If
john uses wireless hotspots and you actually let him in to the database at
all on those ips, you might take away the write access for "other" IPs.
I know just enough to work with one or more books right at hand, and I won't
be feeling well Monday evening*, so I won't be much help. I'll likely be
there.
--John
*This is scheduled, these days.
>
> Lewis S Coleman
>
> On Friday, March 11, 2005, at 04:59 PM, Rod Page wrote:
>
>> Rod, Yes, please post my request. Thanks, Pete
>>
>> -----Original Message-----
>> From: Rod Page [mailto:rpage at olympus.net] Sent: Friday, March 11, 2005
>> 3:31 PM
>> To: Pete Hubbard
>> Subject: Re: Q re MyQSL
>>
>>
>> Hi Pete
>>
>> I really don't know anyone working with MySQL but with
>> your permission I could post this note to the NOPLUG
>> mailing list. NOPLUG is just getting started and I'm in the process of
>> trying to get to know people. I think about 20 people have signed up
>> for
>> the mailing list. We may well have someone who would be interested.
>>
>> Regards, Rod
>>
>> Pete Hubbard wrote:
>>
>>
>>>> Rod
>>>> I got your name from Steve Hamm.
>>>> Do you know someone in the area who knows MySQL well and would be
>>>> willing to help me with a query? I would pay for their time.
>>>> Pete Hubbard
>>>>
>>>
>>
>> _______________________________________________
>> Noplug mailing list
>> Noplug at lists.olympus.net
>> http://lists.olympus.net/mailman/listinfo/noplug
>>
>
> _______________________________________________
> Noplug mailing list
> Noplug at lists.olympus.net
> http://lists.olympus.net/mailman/listinfo/noplug
More information about the Noplug
mailing list