MySQL to blame? (was Re: Command-line PHP script, MySQL CPU usage goes sky-high, stays there--why?)

2007-12-20 Thread M5
I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. I have, and I can't see anything unusual. There are a few scripts that loop with very slow overhead (with sufficien

Re: command line questions

2007-07-14 Thread mos
At 01:38 AM 7/14/2007, Olav Mørkrid wrote: hi, i have some questions about the command line of mysql for WIN32: - does mysql have any macro system that lets you shorten often-used commands, like expanding "n5 mytable" into "select * from mytable order by id desc limit 5" - how can tab completio

RE: command line questions

2007-07-14 Thread Stein, Olaf
As fat as your first and last question go you can create views. create view somename as select c1,c2,c2 from table (limit 5); and then select from somename; i am not familiar with the windows client but i would expect auto completion there too olaf -Original Message- From: Olav Mørkr

RE: command line escape for apostrophe

2004-02-25 Thread Larry Brown
My bad people. The error was elsewhere in the query, but the error happenned to describe the query as failing near where the apostrophe was. Sorry to waste anyone's time. Larry -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 2:25 PM To: M

Re: command line escape for apostrophe

2004-02-25 Thread vpendleton
Are you not able to do SELECT * FROM table WHERE col = "O\'Brien" ? >> Original Message << On 2/25/04, 1:25:06 PM, Larry Brown <[EMAIL PROTECTED]> wrote regarding command line escape for apostrophe: > I usually use php for most of my work, but I have to run a

Re: command line escape for apostrophe

2004-02-25 Thread Paul DuBois
At 14:25 -0500 2/25/04, Larry Brown wrote: I usually use php for most of my work, but I have to run a fair percentage of maintenance etc from the mysql shell program. I have a record that has an apostrophe and so was inserted using php by escaping the ' with \ so that it was put in as \' and it s

Re: command line login question

2004-02-06 Thread Jeremy Zawodny
On Fri, Feb 06, 2004 at 05:06:08PM -0600, Chuck Barnett wrote: > Hi, I am trying to create a script that automatically logs in to mysql and > chooses a db then runs a query. > > I can login fine when doing it this way: > > mysql -u user -p > > it then asks for a pass and it works. > > but if I

Re: command line operation problems

2003-10-23 Thread Rory McKinley
- Original Message - From: "Kelley Lingerfelt" <[EMAIL PROTECTED]> To: "Scott Purcell" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, October 22, 2003 6:52 PM Subject: Re: command line operation problems > Well, according to your message,

Re: command line operation problems

2003-10-22 Thread Kelley Lingerfelt
Well, according to your message, you might want to make sure you are typing mysql and not mysqld(which is the server daemon) According to the docs when I go to the cmd window, I should type in mysql -username and then get prompted for a password. But I get this: look at what you typed, you

Re: Command line fails "mysql mydb < mufile.sql"

2003-10-15 Thread Paul DuBois
At 13:15 -0700 10/15/03, Nestor Florez wrote: Believe it or not I tried mysql -p administrator -p pwd mydb < myfile.sql and it would not worked, but when I got rid of the space it work Yes, that's how it's supposed to work: http://www.mysql.com/doc/en/mysql.html mysql -uadministrator -upwd mydb <

Re: Command line fails "mysql mydb < mufile.sql"

2003-10-15 Thread Nestor Florez
Believe it or not I tried mysql -p administrator -p pwd mydb < myfile.sql and it would not worked, but when I got rid of the space it work mysql -uadministrator -upwd mydb < myfile.sql I did not think that the spaces after the '-u' and the '-p' matter Thanks, Nestor :-) Nestor A. Florez >

Re: Command line fails "mysql mydb < mufile.sql"

2003-10-15 Thread Tobias Asplund
http://www.mysql.com/doc/en/Option_files.html Check the example halfway down the page, it shows how you can supply a password through your my.cnf file. > I can log in as -u administrator when I use the -p option. I need to > make it work > from command line because I am planning to put this c

Re: Command line fails "mysql mydb < mufile.sql"

2003-10-15 Thread Victoria Reznichenko
"Nestor Florez" <[EMAIL PROTECTED]> wrote: > Help, > > Guys I have done this before but it is not working for me when I try to > do some > inserts via a file from the command line > c:\>mysql mydb < myfile.sql > ERROR 1044: Access denied for user: '@localhost' to database 'mydb' > > I am logged i

Re: Command line fails "mysql mydb < mufile.sql"

2003-10-15 Thread Nestor Florez
Did not workd, I get an error ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) I can log in as -u administrator when I use the -p option. I need to make it work from command line because I am planning to put this command in a script to make it automatic to insert re

RE: command line exectution of query(newbie)

2003-03-06 Thread Anil Garg
thanks, that helped :) -Original Message- From: Jennifer Goodie [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 1:49 PM To: Anil Garg; [EMAIL PROTECTED] Subject: RE: command line exectution of query(newbie) Database name goes after options. It is showing you the help page

RE: command line exectution of query(newbie)

2003-03-06 Thread Paul DuBois
The help message is so long that you probably didn't notice the error message at the beginning. any more ideas? thanks and regards anil. -Original Message- From: Jocelyn Fournier [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 2:38 PM To: Anil Garg; [EMAIL PROTECTED] Subjec

RE: command line exectution of query(newbie)

2003-03-06 Thread Jennifer Goodie
Database name goes after options. It is showing you the help page because it does not understand what you are passing to it. It's kind of saying "Here, look at this, this is how I work, follow these directions they might help you out." -Original Message- From: Anil Garg [mailto:[EMAIL PR

RE: command line exectution of query(newbie)

2003-03-06 Thread Anil Garg
8 PM To: Anil Garg; [EMAIL PROTECTED] Subject: Re: command line exectution of query(newbie) Hi, The right DELETE syntax is : delete from where id > 5; Regards, Jocelyn - Original Message - From: "Anil Garg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursd

Re: command line exectution of query(newbie)

2003-03-06 Thread Jocelyn Fournier
Hi, The right DELETE syntax is : delete from where id > 5; Regards, Jocelyn - Original Message - From: "Anil Garg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 6:26 PM Subject: command line exectution of query(newbie) > Hi, > > What am i doing wrong: >

RE: [PHP] Re: Command Line

2002-08-28 Thread esctoday.com | Wouter
bericht- Van: Adam Williams [mailto:[EMAIL PROTECTED]] Verzonden: 28 August 2002 03:19 Aan: Trevor Tregoweth CC: mysql; PHP Onderwerp: Re: [PHP] Re: Command Line if you just wanna delete everything from the tables you can do DELETE FROM table_name; for each table. or you can do DROP table_name

Re: Command Line

2002-08-27 Thread Dicky Wahyu Purnomo
Pada Tue, 27 Aug 2002 20:20:33 -0500 "Gerald R. Jensen" <[EMAIL PROTECTED]> menulis : > Trevor ... > > Do you want to drop the tables, or simply delete the data in them and retain > the table structure? > > To delete data ... > USE databasename; > DELETE * FROM tablename; > > To drop t

Re: [PHP] Re: Command Line

2002-08-27 Thread Adam Williams
if you just wanna delete everything from the tables you can do DELETE FROM table_name; for each table. or you can do DROP table_name; for each one but then you have to re-create each table that you drop with CREATe TABLE ( stuff here ); Only use DROP table_name; if you know the structure of ea

Re: Command Line

2002-08-27 Thread Gerald R. Jensen
table, then need to store data in it, you will have to re-create it. - Original Message - From: "Trevor Tregoweth" <[EMAIL PROTECTED]> To: "mysql" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: Tuesday, August 27, 2002 8:12 PM Subject: R

Re: Command Line

2002-08-27 Thread Trevor Tregoweth
Hi I am very new to mysql, so any help please how to drop tables from a database from the command line i have 6 tables in there, and need to be able to flush all the data out, (of 2 tables only) so there might be another way Thanks Trevor

Re: Command line interface

2002-06-03 Thread j.urban
Have a look at urSQL from http://www.urbanresearch.com/ursql On Mon, 3 Jun 2002, Ehmer David wrote: > Hi > > Very new to MySQL and just wondering if there is an alternative > interface to the command line. The beginners tutorial I am working > through from WWW.Mysql.com seems to do all tasks fr

Re: command line interface

2002-06-03 Thread [EMAIL PROTECTED]
> How do most users of MySQL interact with the program. I would imagine entering or editing large amounts of data at the command line would be quite a task. I have to say thhe comannd line interface is by far my preferred interface against MySQL. There are a few free GUI tools running on windows

Re: Command line interface

2002-06-02 Thread Sherzod B. Ruzmetov
I use exclusevely command line interface, and i believe most of the programmers prefer command line interface over GUI. As to large queries... just save them in yor files or use 'edit' command. On Mon, 3 Jun 2002, Ehmer David wrote: > Hi > > Very new to MySQL and just wondering if there is

Re: Command Line Tool

2002-04-05 Thread BD
Lenny, You might find it easier to use a GUI like MySQL Front from http://www.anse.de/mysqlfront/. It will save you a great deal of time. Just enter (or copy and paste) the SQL into their query window and press a button. Editing your errors are also a lot easier. It is free or you can

Re: Command Line Tool

2002-04-05 Thread Paul DuBois
At 10:43 -0600 4/5/02, Paul DuBois wrote: >At 10:29 -0600 4/5/02, Lenny Sorey wrote: >>I'm having a bit of a problem trying to get MySQL version 4.0.1-alpha-max-nt >>binary version >> >>to accept The Command - Line Tool to run a script to create a table. >> >>My operating system is Windows 2000 Pr

Re: Command Line Tool

2002-04-05 Thread Paul DuBois
At 10:29 -0600 4/5/02, Lenny Sorey wrote: >I'm having a bit of a problem trying to get MySQL version 4.0.1-alpha-max-nt >binary version > >to accept The Command - Line Tool to run a script to create a table. > >My operating system is Windows 2000 Professional. I can connect with >MyODBC-3.51.02.ex

Re: Command Line Editing Mode

2002-01-04 Thread Jörgen Winqvist
Hi, This $HOME/.inputrc gets you "vi-mode" in mysql and other programs that uses readline. set editing-mode vi set show-all-if-ambiguous On # after TAB is pressed Regards Jörgen Quentin Bennett wrote: >Hi, > >Using the mysql CLI, I have discovered that > >ESC-Return Return > >will put the C

RE: Command Line Editing Mode

2002-01-04 Thread Fulko Hew
Quentin Bennett <[EMAIL PROTECTED]> wrote: > Using the mysql CLI, I have discovered that > > ESC-Return Return > > will put the CLI editor in to 'vi' mode, and allow me to use my 'normal' ksh > editing keys, available in ksh after "set -o vi". Cool... Thanks... I didn't know that. Now I can

Re: Command Line Editing Mode

2002-01-03 Thread Dan Nelson
In the last episode (Jan 04), Quentin Bennett said: > Using the mysql CLI, I have discovered that > > ESC-Return Return > > will put the CLI editor in to 'vi' mode, and allow me to use my > 'normal' ksh editing keys, available in ksh after "set -o vi". > > Because I am more familiar with the v

Re: command line question..

2001-12-05 Thread Denis A. Rudakov
Hello ! I often use that common scheme to parametrize my queries. #!/bin/bash #check parameters most commonly (only number of parameters) if [ $# !=NUMBER_OF_PARAMETERS_NEEDED ]; then echo "Too few parameters";exit 1; fi # these are queries in my "transactional" procedure # $1...$N ar

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-08 Thread Christopher R. Jones
It is tough for those who have never typed a command. It is analogous to learning to drive a standard transmission - it is very easy to transfer to an automatic but not visa versa. My first computer was an 8088 with a 4o meg harddrive, DOS 5.2 with Turbo C as my compiler. Switching to Unix w

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-07 Thread Robert Alexander
At 23:07 -0700 2001/09/06, Chadrick Mahaffey wrote: >I realize that I'm going to be in the minority here but I have to say it. >Open source would go much farther if they had self explanatory GUIs and had >basic pre-setup apps that were ready for the average user to use. I program >in Java and I fe

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-07 Thread Joshua M . Schmidlkofer
I wanted to put in my 2 cents. Access is not an RDBMS.. It is a single user - small user, and frequent fix type system. I have never worked on a real database system that does not have a command line interface. It seems fearsome at first, but it's actually easy. SQL Server do doubt ha

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-07 Thread Paul D. Smith
%% Chadrick Mahaffey <[EMAIL PROTECTED]> writes: cm> How do I start the server and create a database in plain English. I'm not cm> familiar with: cm> SECTION 4.16 - Documentation shell> ./scripts/mysql_install_db shell> cd mysql_installation_directory shell> ./bin/safe_mysqld --u

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-07 Thread Robert Cross
Chadrick Mahaffey wrote: >what does all this mean? I tried to type this in my command console changin >/ to \ and I don't understand what is happening. I get all kinds of errors. It looks to me that you're trying to use the Unix install notes - don't! Refer to section 2.1.2 in the excellent man

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-06 Thread Michael Bacarella
On Thu, Sep 06, 2001 at 11:07:25PM -0700, Chadrick Mahaffey wrote: [...] > shell> cd mysql_installation_directory > shell> ./bin/mysql_install_db > shell> ./bin/safe_mysqld --user=mysql & > > what does all this mean? I tried to type this in my command console changing > / to \ and I don't unders

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-06 Thread Dana Powers
> I know these are pathetic questions to most of you so please have patience > with a Windows user... Hehe, welcome to the world of the command line... > what is "shell>"? In windows world, this is the 'MS-DOS Prompt'. Will probably look like this to you: C:\> In unix, it is typically something l

Re: command line open source ARRRGGGGGG!!!!!!

2001-09-06 Thread Neil Zanella
On Thu, 6 Sep 2001, Chadrick Mahaffey wrote: > I realize that I'm going to be in the minority here but I have to say it. > Open source would go much farther if they had self explanatory GUIs and had > basic pre-setup apps that were ready for the average user to use. Perhaps your company should

Re: Command line utility?

2001-01-25 Thread John Stumbles
On Wed, 24 Jan 2001, Marc Kidwell Pestana wrote: > Try writing a PERL wrapper, that dumps the table to the screen and then > pipe it to more > > % MyPerlwrapper -table | more I think there is a perl wrapper somewhere (with msql-mysql-modules perhaps?) but the original question begs the

Re: Command line utility?

2001-01-24 Thread Marc Kidwell Pestana
Try writing a PERL wrapper, that dumps the table to the screen and then pipe it to more % MyPerlwrapper -table | more >Is there a user friendly utility that would allow one to display the >structure of a table or view the contents of one? Of course, this can >be done from within "mysql -p" bu

RE: Command line utility?

2001-01-24 Thread Mark Maunder
mysql etoys < test.txt | more where test.txt contains something like: desc addresses; desc members; Or try mysqldump dbname addresses members orders -d | more That'll give you the data definition language without any data for each table. (addresses, members and orders in the above example) If