RE: MySQL & security

2003-04-05 Thread Michael Shulman
In your "user" table in the mysql database, remove all the lines that allow logins from other hosts. mysql> use mysql mysql> delete from user where host <> "localhost; mysql> flush privileges; -ms -Original Message- From: Mel [mailto:[EMAIL PROTECTED] Sent: Saturday, April 05, 2003 9:3

RE: Re: [MySQL] RE: Question: Connecting MySQL with DreamWeaver MX on Windows 2000

2003-04-04 Thread Michael Shulman
Kira, Let's take it a step at a time. First, make sure that your MySQL is running. Have you started the server with \mysql\bin\winmysqldmin.exe? Look for a traffic light in your system tray, and the green light showing. Now, try to connect using the \mysql\bin\mysql.exe command line tool. By def

RE: Query formulation question

2003-04-04 Thread Michael Shulman
This is quite complicated with SQL. However, Microsoft Excel has excellent tools for creating crosstabs exactly like this. -ms -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 9:56 AM To: [EMAIL PROTECTED] Subject: Query formulation quest

RE: Pre parsing

2003-04-04 Thread Michael Shulman
The -f (force) flag will tell your script to continue even if it encounters an error. http://www.mysql.com/doc/en/mysql.html -ms -Original Message- From: Jerry [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 5:46 AM To: [EMAIL PROTECTED] Subject: Pre parsing Hi, Anyone know of

RE: Question:

2003-04-03 Thread Michael Shulman
Kira, please correct your subject line and ask your question again. -ms -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: Question: Question: can I install mySql on my computer and test php with

RE: select help

2003-04-02 Thread Michael Shulman
John, Looks like I'm first with the wrong answer again. This time for sure. How about: AND os.os_id & 8 = 8 Where 8 is the value that you're looking for. -ms -Original Message- From: Michael Shulman [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:3

RE: select help

2003-04-02 Thread Michael Shulman
gt; select * from t where mod(i,4) = 0; +--+ | i| +--+ |4 | |8 | +--+ 2 rows in set (0.00 sec) -Original Message- From: John Hoskins [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:34 AM To: Michael Shulman Cc: [EMAIL PROTECTED] Subject: RE: select hel

RE: Join Statement

2003-04-02 Thread Michael Shulman
You can't use a JOIN on an insert, only on a SELECT. The (simplest) syntax for INSERT is INSERT INTO (col1, col2, col3) VALUES (val1, val2, val3) You can also INSERT as a result of a SELECT, but that's not what you want. Unfortunately, you will need to create multiple INSERT statements to kee

Request: please use meaningful subject lines

2003-04-02 Thread Michael Shulman
I'm getting 100 messages a day on this newsgroup. While I love to help, I don't like having to read each message to figure out if it's something I can help with. Here are examples subject lines from the past 24 hours: How many Help MySQL Beginner please. Have a problem

RE: select help

2003-04-02 Thread Michael Shulman
mysql> select solution -> from os_table os, solutions_table solutions -> where os.os_id = solutions.os_code -> and os.os_id = 8; -ms -Original Message- From: John Hoskins [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 10:41 AM To: [EMAIL PROTECTED] Subject: select

RE: password not working from command line

2003-04-02 Thread Michael Shulman
--Original Message- From: Eldon Ziegler [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 3:56 AM To: Michael Shulman Subject: RE: password not working from command line Michael, The result of a SELECT * INTO OUTFILE FROM user is attached. Thanks Eldon At 02:53 pm 4/1/2003 -0800, you wr

RE: password not working from command line

2003-04-01 Thread Michael Shulman
Privilege changes (at least on Windows) don't seem to take effect until either (a) the server is restarted, or (b) the server is instructed to re-read its permissions tables. The best solution I've found is to include the line "flush privileges" into Mysql sessions that manipulate users or permiss

RE: password not working from command line

2003-04-01 Thread Michael Shulman
Or, you can use the alternate, more legible syntax: mysql --user=username --password=pass -ms -Original Message- From: Andy Eastham [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 10:36 AM To: [EMAIL PROTECTED] Mysql. Com Subject: RE: password not working from command line Eldo

RE: Opposite of DISTINCT()

2003-04-01 Thread Michael Shulman
SELECT col1 FROM table1 GROUP by col1 HAVING count(col1) > 1 -ms -Original Message- From: Bob Sawyer [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 12:04 PM To: MySQL List Subject: Opposite of DISTINCT() I know that using SELECT DISTINCT(colname) will result in output that do

What does the "user" parameter in my.ini on Windows do?

2003-03-31 Thread Michael Shulman
The first time I run winmysqladmin, it creates a my.ini file for me in the windows directory. It prompts for a username and password, recommended for first time users, it says. What does the "user=" and "password=" fields in the my.ini file do? They don't seem related to the "mysql" command lin

Re: Passwords don't work in a WinME installation?

2003-03-31 Thread Michael Shulman
We are using it on Windows 2000 and Windows XP. But it doesn't seem to be tied in to the Windows security system, so it should work the same on WinME. -ms - Original Message - From: "Martin Gainty" <[EMAIL PROTECTED]> To: "Michael Shulman" <[EM

RE: Passwords don't work in a WinME installation?

2003-03-31 Thread Michael Shulman
Start reading here: http://www.mysql.com/doc/en/Privileges.html and read to 4.2.10. Two tips I found useful: 1. The current_user() function tells you what MySQL user name it thinks that you are. This can be used to verify if you are an authenticated user. mysql> SELECT current_user(); 2. Remove

Re: Getting an empty result set is what I want!

2003-03-28 Thread Michael Shulman
Sure! Try this: SELECT * FROM table WHERE 1=2 -ms - Original Message - From: "Scott Teglasi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 28, 2003 10:42 PM Subject: Getting an empty result set is what I want! Hi all, this is Scotty. I wanted to know if it's possi

RE: mysql under unix in batch mode

2003-03-26 Thread Michael Shulman
I prefer the alternate form of this command. It's easier to read: mysql --host=localhost --user=root --password=mysql < did.query > did.out -ms -Original Message- From: Dobromir Velev [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 4:22 AM To: Marianadin, Didier; [EMAIL PROTE

RE: date problem

2003-03-23 Thread Michael Shulman
It looks like it's in now() format, but without the punctuation. The line from your insert statement is 20030323225645 If we break this apart, we see: Year = 2003 Month = 03 Date = 23 Hour = 22 (or 10pm) Minute 56 Seconds 45 Someone else on the list: where or how is the timezone encode, or th

RE: SELECT over more than one table

2003-03-21 Thread Michael Shulman
Look at the HAVING clause. c are columns, t are tables SELECT c1, c2, c3, sum(c4) FROM WHERE t1.c1 = t2.c1 AND t2.c2 = t3.c2 HAVING sum(c4) > 0 -ms -Original Message- From: Sorin Marti [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 2:36 AM To: [EMAIL PROTECTED] Subject: Re:

RE: long query

2003-03-19 Thread Michael Shulman
Each line in MySQL is terminated with a semicolon (;). You can break your query into as many lines as you need, and just end the last one with a semicolon. C:\mysql\bin>mysql --user=root -p Enter password: ** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection

RE: Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Michael Shulman
is blank. However, I did not reload the service. When I did, it now looks like the correct behavior is happening. -ms -Original Message- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 5:53 AM To: Michael Shulman Cc: [EMAIL PROTECTED] Subject: Re: Problem w

Problem with permissions on Windows in 4.0.11a Gamma?

2003-03-18 Thread Michael Shulman
red | foo | | root | localhost | +------+---+ 2 rows in set (0.00 sec) Am I doing something wrong, or is this a nasty bug? -ms Michael Shulman - Before posting, please check: http://www.mysql.com/manual.php (