BUG: MySQL 5.1.19 with UNCOMPRESS on *VALID* data fails when generated by 3rd party zlib.
OK I think I've found a bug with MySQL's compression support. :-/ I'm using two Java zlib implementations. One is jzlib 1.0.7 and the other is java.io.DeflateOutputStream . Both of these are referenced by the zlib implementation as being compatible. I can compress/uncompress locally WITHOUT a problem. When I store the data in the DB the value is stored correctly in a blob and I can compare the MD5 hashcode with my local array of and the hashcode values are identical which for all practical purposes means they're the same. The only problem is that UNCOMPRESS won't work... It returns null and I get: mysql> SHOW WARNINGS; +---+--+-+ | Level | Code | Message | +---+--+-+ | Error | 1256 | Uncompressed data size too large; the maximum size is 1047552 (probably, length of uncompressed data was corrupted) | +---+--+-+ 1 row in set (0.00 sec) Sure enough: mysql> SELECT UNCOMPRESSED_LENGTH(BODY) FROM FOO; +---+ | UNCOMPRESSED_LENGTH(BODY) | +---+ | 147577464 | +---+ 1 row in set (0.00 sec) .. I've tested this on 5.1.19 and 4.1.21 with the same symptoms. Anyone have any advice here? Did you guys make any changes with the zlib implementation you're using? I'm willing to file this as a bug if necessary. Kevin -- Founder/CEO Tailrank.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Blog: feedblog.org Cell: 415-637-8078
RE: [HACKERS] Selecting a constant question
> -Original Message- > From: Hannu Krosing [mailto:[EMAIL PROTECTED] > Sent: Monday, June 11, 2007 10:43 PM > To: Larry McGhaw > Cc: Tom Lane; Alvaro Herrera; Dann Corbit; Gregory Stark; Martijn van > Oosterhout; [EMAIL PROTECTED] > Subject: Re: [HACKERS] Selecting a constant question > > Ühel kenal päeval, E, 2007-06-11 kell 22:11, kirjutas Larry McGhaw: > > As far as I am aware these statements are true. If you have a > > specific example you could provide to the contrary that would be > > interesting. > > > > Even if there are such conditions it does not change the fact that > > libpq and/or postgresql is deficient in this area. > > > > For any query, the database should be capable of describing the > > metadata for the columns, which includes > > 1) the column type > > and > > 2) the column maximum length. > > > > This is such a basic database interface principle that I very > > disappointed that someone has not recognized this and simply said " > > yes, we see the issue we will work on it". > > > > Again, *all* other major relational databases do this ... even blob > > fields have a maximum length reported from the database. > > > > I hope someone who truly understands database interfaces will read > > this thread and address the issue. > > For now we will have to "special case" postgres in our application > > until it is addressed. > > > > or redesign your application so that it allocates memory as needed and > won't waste client memory by allocating maximum possible amount for each > and every grid cell weather needed or not ;) > > As I understand from this discussion you are writing some kind of > middleware (i.e. tools), and I'd expect toolmakers to do the right > thing. In this case the middleware is: ODBC/JDBC/OLEDB/.NET data drivers for PostgreSQL. There are other related tools, but the above is the product for which the bug needs corrected. > allocating as much as possibly ever needed is something that would be > excusable in quick-n-dirty end user application, but not in a tool. It's a requirement of the ODBC/JDBC/OLEDB/.NET specifications. I suppose we could scan the table twice to figure out how large a column might be, but that would make the PostgreSQL driver run at 1/2 speed. Not a very appetizing solution. None of the other database vendors has any trouble reporting this information correctly. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to get Number of rows matched?
Thanks All for your help! If someone from MySQL team is looking at this mail thread, we request to include this feature in future release. Cheers, Rajan On 6/11/07, Michael Dykman <[EMAIL PROTECTED]> wrote: no, there is nothing else. There are cleaner interfaces to this information but, for PHP. the string returned by mysql_info() is all you get. The format of that string is very regular and we have been using it in production software for well over a year now with no issues. - michael On 6/11/07, Ace <[EMAIL PROTECTED]> wrote: > Yes, you are right! mysql_info() is not most useful. It does give me number > of rows matched but will involve complications of parsing the string. > > Is there no other way to this? How can this be missed? I am not so > convinienced on mysql_info()! > > > On 6/11/07, Jerry Schwartz <[EMAIL PROTECTED]> wrote: > > > > Have you looked at mysql_info()? The format of the return value might not > > be > > the most useful, but it should give you what you need. > > > > Regards, > > > > Jerry Schwartz > > The Infoshop by Global Information Incorporated > > 195 Farmington Ave. > > Farmington, CT 06032 > > > > 860.674.8796 / FAX: 860.674.8341 > > > > www.the-infoshop.com > > www.giiexpress.com > > www.etudes-marche.com > > > > > > > -Original Message- > > > From: ViSolve DB Team [mailto:[EMAIL PROTECTED] > > > Sent: Monday, June 11, 2007 6:15 AM > > > To: Ace; mysql@lists.mysql.com > > > Subject: Re: how to get Number of rows matched? > > > > > > Hi > > > > > > AFAIK, before changing data, the old values are saved in the rollback > > > segment. > > > On saving the updated values, from the Buffer to the rollback > > > segment/data > > > files, > > > --- it checks if there is any matched row that matches the > > > condition. If > > > found, then flags "Matched". > > > ---after filtering out the matched row, it check whether > > > there is need to > > > change the old value to new value. if need then flags > > > "Changed" and rewrite > > > the same in the datafile/rollback segment. > > > > > > > > > Thanks > > > ViSolve DB Team. > > > - Original Message - > > > From: "Ace" <[EMAIL PROTECTED]> > > > To: > > > Sent: Monday, June 11, 2007 11:41 AM > > > Subject: how to get Number of rows matched? > > > > > > > > > > Hi Experts, > > > > > > > > When issuing updates in mysql (in the console window), > > > mysql will tell > > > > you if any rows matched and how many rows were updated (see > > > below). I > > > > know how to get number of rows udpated using > > > mysql_affected_rows(), but is > > > > there any > > > > way to get the number of rows matched? I want to find out, > > > when rows > > > > updated = 0, if there were no updates because the row wasn't found > > > > (rows matched will = 0) or because the update would not have changed > > > > any data (rows matched = 1). > > > > > > > > mysql> select * from test; > > > > +--+--+ > > > > | roll | s| > > > > +--+--+ > > > > |1 | new | > > > > +--+--+ > > > > 1 row in set (0.00 sec) > > > > > > > > mysql> update test set roll = 1, s = 'new' where roll = 1; > > > > Query OK, 0 rows affected (0.00 sec) > > > > Rows matched: 1 Changed: 0 Warnings: 0 > > > > > > > > mysql> update test set roll = 1, s = 'new' where roll = 17; > > > > Query OK, 0 rows affected (0.00 sec) > > > > Rows matched: 0 Changed: 0 Warnings: 0 > > > > > > > > mysql> update test set roll = 1, s = 'neww' where roll = 1; > > > > Query OK, 1 row affected (0.00 sec) > > > > Rows matched: 1 Changed: 1 Warnings: 0 > > > > > > > > -- > > > > Cheers, > > > > Rajan > > > > > > > > > > > > > -- > > > -- > > > > > > > > > No virus found in this incoming message. > > > Checked by AVG Free Edition. > > > Version: 7.5.472 / Virus Database: 269.8.13/843 - Release > > > Date: 6/10/2007 > > > 1:39 PM > > > > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: > > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > > > > > -- - michael dykman - [EMAIL PROTECTED] - All models are wrong. Some models are useful.
Re: perl DBI does not do execute mysql statement
Baron Schwartz wrote: Kemin Zhou wrote: Hi All, I have one of the toughest problem to solve now. I have not been able to sleep well in the last three days. There is a simple query insert into table foo (column1, column2, column5) select $col from bar If I run this query by hand whatever the value of $col, it works fine. The insertion was done. If I run this query with other values of $col this sql works fine if $col is not name. If $col eq "name" then the insertion does not happen and no error message is given. (Of course, if I run the same query by hand, then this works fine). I would first get some sleep, then enable DBI tracing and turn on the MySQL general query log and see what query is really getting sent to the server. Baron Hi Baron, Best advice. I forgot about this one. I fixed the bug but I don't know how. I randomly changed form feature of the connection of the DBI object. Before this I experimented the ` quote symbol it did not help. To figure out what had caused the problem I need to ask the sysadmin for this. I was working on a database that I don't have easy access of the log files. Thanks for the help. Kemin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: maximum number of records in a table
On 6/11/07, kalin mintchev <[EMAIL PROTECTED]> wrote: hi all... from http://dev.mysql.com/doc/refman/5.0/en/features.html: "Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows." that's cool but i assume this is distributed over a few machines... we have a new client that needs a table with 99 000 000 rows, 2 -3 columns. i was just wondering if i have a two dual core 2 processors in a machine with 4 gigs of ram - is that enough to host and serve queries from a table of this size? a few tables on the same machine? more than one machine? what are the query times like? can somebody please share some/any experience s/he has/had with managing databases/tables with that amount of records. i'd really appreciate it... 99 million isn't that large of a number. If you key the database properly, search times should be very modest. I can't speak for insert times, though, especially when keys are involved. This kind of thing is easy enough to do in your favorite scripting language. I would just create a table with a few keys and just for($i=0; $i<9900; $i++) it with random numbers. If you have PHP on your system, here is some PHP code (runnable from the command line) that you should be able to hack down. It should answer your immediate questions about which PHP statements to use (if you've never done this from PHP before): http://gpl.e3ft.com/vcvsgpl01/viewcvs.cgi/gpl01/webprojs/fboprime/sw/standalone/dbtestpop.php?rev=1.31&content-type=text/vnd.viewcvs-markup http://gpl.e3ft.com/vcvsgpl01/viewcvs.cgi/gpl01/webprojs/fboprime/sw/phplib/usrs.inc?rev=1.11&content-type=text/vnd.viewcvs-markup Near the end of it, especially if the software writes output, you should get an intuitive feel for how long each INSERT is taking. You can even do test queries using the barebones MySQL client ... you should see interactively how long a query takes. I would ALMOST do this for you, but it is just beyond the threshold of what I'd do because I'm bored and watching TV. I'm just a little curious myself. I've never messed with a table about 10,000 rows or so. Dave
Re: MySQL Magazine - Issue 1 available NOW!!!!
At 5:53p -0400 on 11 Jun 2007, Gordan Bobic wrote: I don't understand this never-ending fascination with re-inventing a square wheel for an application for which the standard round type has already been kindly provided since year dot. I imagine the reason for this "never-ending fascination ..." is along the lines of education. To the uninitiated, the idea of binding variables seems weird and unintuitive. "What?! I don't want them to be bound! They're variables! They're supposed to change." Okay, so it's a slight exaggeration, but I think the point is still good. A lot of folks pick up MySQL by fiddling around in their spare time. Unless someone (among my friends, it's usually me) enlightens them to better ways of doing things, and reasons for doing something in a more abstract, not-always-immediately-intuitive way, folks just don't know any better. In that sense, this very discussion is /exactly/ what the magazine article should be creating. For those who don't know, binding is a process that does two things: 1. Lets the database pre-parse a query This can give enormous boosts in speed because a large amount of the time involved in getting information from the database is spent in parsing and planning a query. If you're planning to do the same query many times over with only one or two different parameters, why not only parse and plan it once, and then aggregate the cost over / all/ the executions? 2. as well as let the database do any escaping necessary. The database designers ostensibly know best what characters need to be escaped, so let them do it. Besides, no sense in having multiple definitions around, or reinventing a wheel, or wasting your time doing something mundane. In lieu of an example, I'll just point to the PHP site: http://us.php.net/manual/en/function.mysqli-prepare.php Kevin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: maximum number of records in a table
> The answer depends upon the actual queries and/or how much data is being > returned. there is ALWAYS only one record found/returned per query it's like looking up one unique id it's like checking if number 5893786 is there in row number one... or something like number 5893786 - a unique id... > trying to answer only based upon row count is NONSENSICAL, IMO. > > > On 6/11/07, kalin mintchev <[EMAIL PROTECTED]> wrote: >> >> hi all... >> >> from http://dev.mysql.com/doc/refman/5.0/en/features.html: >> >> "Handles large databases. We use MySQL Server with databases that >> contain >> 50 million records. We also know of users who use MySQL Server with >> 60,000 >> tables and about 5,000,000,000 rows." >> >> that's cool but i assume this is distributed over a few machines... >> >> we have a new client that needs a table with 99 000 000 rows, 2 -3 >> columns. >> i was just wondering if i have a two dual core 2 processors in a machine >> with 4 gigs of ram - is that enough to host and serve queries from a >> table >> of this size? >> a few tables on the same machine? >> more than one machine? >> what are the query times like? >> >> can somebody please share some/any experience s/he has/had with managing >> databases/tables with that amount of records. i'd really appreciate >> it... >> >> >> thanks a lot >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: >> http://lists.mysql.com/[EMAIL PROTECTED] >> >> > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
maximum number of records in a table
hi all... from http://dev.mysql.com/doc/refman/5.0/en/features.html: "Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows." that's cool but i assume this is distributed over a few machines... we have a new client that needs a table with 99 000 000 rows, 2 -3 columns. i was just wondering if i have a two dual core 2 processors in a machine with 4 gigs of ram - is that enough to host and serve queries from a table of this size? a few tables on the same machine? more than one machine? what are the query times like? can somebody please share some/any experience s/he has/had with managing databases/tables with that amount of records. i'd really appreciate it... thanks a lot -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Building RPMs with ICC
Having just tried building MySQL 6.0 SRPM on CentOS/RHEL 5, it would appear that it doesn't even build cleanly with the default settings with GCC! Has anyone got any information as to why this might be? It seems to build OK, but then all the tests (mysql-test-run) seem to fail. Is this known not to work, or am I just unlucky enough to be the first one to try it? Gordan Gordan Bobic wrote: > Hi, > > I'm trying to build the RPMs with ICC, but I'm not having a lot of luck. I > saw the documentation for what paremeters are used to combile the tar > balled binaries, but can anyone give me some guidance on how to get the > RPMs to build? > > The distributions I want to build for are CentOS 5.0 / x86_64 and RedHat 9 > / pentium3. > > At the moment I have tried the following: > export CC=icc > export CXX=icpc > export MYSQL_BUILD_PATH=$PATH > export CPATH=/path/to/my/icc/includes > export LIBRARY_PATH=/path/to/my/icc/lib > > Added ICC libs to ld.so.conf > > Changed parameters on icc in ~/.rpmrc: > optflags: x86_64 -O3 -march=pentium4 -mtune=pentium4 -mcpu=pentium4 -msse3 > -xP -no-gcc -restrict -ip -mp -funroll-loops > > which is pretty close to the documented example. I had to add the > -march/-mtune/-mcpu parameters because it looks like the default Makefile > somewhere was trying to substitute x86_64 in there, and this is not a > valid value for ICC v9.1 (thus causing it to abort). Instead it now just > issues a warning and says that it is overriding pentium4 with -msse3, but > proceeds with building. > > Then I tried: > rpmbuild --define "__cc icc" --rebuild MySQL-6.0.0-0.glibc23.src.rpm > > Then things fail at various points. Then I doctored the rpm file to > exclude building of NDB, InnoDB and most other optional DB engines (I only > really require MyISAM, but I'm tryign to be a bit future facing so I'm > usiong 6.0 instead of 5.x). Eventually I get a segfault from the linker > and static mysqld library fails to build, at which point the process dies. > > Is there any more detailed guidance available for building RPMs with ICC? > > Many thanks. > > Gordan > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Magazine - Issue 1 available NOW!!!!
Oh dear... Without getting into any religious arguments, if you have to use it, PHP already provides a perfectly good interface for preventing any SQL injections - ever. Use MySQLi and bound parameters. And if somebody manages to invent some quasi-valid reason for not using MySQLi (e.g. version of PHP used), then there is always mysql_escape_string() / mysql_real_escape_string(). I don't understand this never-ending fascination with re-inventing a square wheel for an application for which the standard round type has already been kindly provided since year dot. /RANT Gordan Daevid Vincent wrote: > Yes, you are correct. In a cruel, ironic twist, that actually bit me in > the ass, as it turns out we tried to import some "HTML" output from MS > Word, which adds all kinds of crazy XHTML comment tag thingys that look > like: > > > Etc. > > *sigh* > > >> -Original Message- >> From: Yves Goergen [mailto:[EMAIL PROTECTED] >> Sent: Saturday, June 09, 2007 4:34 AM >> To: Daevid Vincent >> Cc: 'B. Keith Murphy'; 'MySQL General' >> Subject: Re: MySQL Magazine - Issue 1 available NOW >> >> On 04.06.2007 23:44 CE(S)T, Daevid Vincent wrote: >>> Thanks for the magazine. I already incorporated a little extra SQL >>> injection checking into my db.inc.php wrapper... >>> >>> //[dv] added to remove all comments (which may help with >> SQL injections >>> as well. >>> $sql = preg_replace("/#.*?[\r\n]/s", '', $sql); >>> $sql = preg_replace("/--.*?[\r\n]/s", '', $sql); >>> $sql = preg_replace("@/\*(.*?)\*/@s", '', $sql); >> I'm not aware of the context, but I guess you can imagine >> that this will >> corrupt any SQL queries that contain "#" or "--" or "/* ... >> */" inside a >> string. So I would highly recommend not using those. >> >> -- >> Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> >> Visit my web laboratory at http://beta.unclassified.de >> > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySQL Magazine - Issue 1 available NOW!!!!
Yes, you are correct. In a cruel, ironic twist, that actually bit me in the ass, as it turns out we tried to import some "HTML" output from MS Word, which adds all kinds of crazy XHTML comment tag thingys that look like: Etc. *sigh* > -Original Message- > From: Yves Goergen [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 09, 2007 4:34 AM > To: Daevid Vincent > Cc: 'B. Keith Murphy'; 'MySQL General' > Subject: Re: MySQL Magazine - Issue 1 available NOW > > On 04.06.2007 23:44 CE(S)T, Daevid Vincent wrote: > > Thanks for the magazine. I already incorporated a little extra SQL > > injection checking into my db.inc.php wrapper... > > > > //[dv] added to remove all comments (which may help with > SQL injections > > as well. > > $sql = preg_replace("/#.*?[\r\n]/s", '', $sql); > > $sql = preg_replace("/--.*?[\r\n]/s", '', $sql); > > $sql = preg_replace("@/\*(.*?)\*/@s", '', $sql); > > I'm not aware of the context, but I guess you can imagine > that this will > corrupt any SQL queries that contain "#" or "--" or "/* ... > */" inside a > string. So I would highly recommend not using those. > > -- > Yves Goergen "LonelyPixel" <[EMAIL PROTECTED]> > Visit my web laboratory at http://beta.unclassified.de > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Rolando! Yes, that worked! I did have to log into mysql as root, however... BTW, for some odd reason someone's symantec virus checker is sending me denied e-mail responses from Italy, whenever I try to post to the MySQL mailing list. Many, many thanks, Unnsse On Jun 11, 2007, at 1:41 PM, Rolando Edwards wrote: Don't you mean this ? grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; - Original Message - From: "untz" <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Monday, June 11, 2007 4:36:33 PM (GMT-0500) America/New_York Subject: Re: Access Denied When Trying to Create Database Gerald, I tried this and it still didn't work! Raven:~ untz$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 223 to server version: 5.0.16-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant super privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'privileges on *.* to 'untz'@'localhost' identified by 'maddog'' at line 1 mysql> :( Kindest regards, Unnsse On Jun 11, 2007, at 1:28 PM, Gerald L. Clark wrote: untz wrote: Gerald, I tried this and still got an error! mysql> grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1045 (28000): Access denied for user 'untz'@'localhost' (using password: YES) mysql> Can anyone please help me? I am unable to use MySQL at all, at this point... -untz You have to be logged-in to mysql as a privileged user to grant permissions to others. Logout, and login as root. -- Gerald L. Clark Supplier Systems Corporation -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Don't you mean this ? grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; - Original Message - From: "untz" <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Monday, June 11, 2007 4:36:33 PM (GMT-0500) America/New_York Subject: Re: Access Denied When Trying to Create Database Gerald, I tried this and it still didn't work! Raven:~ untz$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 223 to server version: 5.0.16-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant super privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'privileges on *.* to 'untz'@'localhost' identified by 'maddog'' at line 1 mysql> :( Kindest regards, Unnsse On Jun 11, 2007, at 1:28 PM, Gerald L. Clark wrote: > untz wrote: >> Gerald, >> I tried this and still got an error! >> mysql> grant all privileges on *.* to 'untz'@'localhost' >> identified by 'maddog'; >> ERROR 1045 (28000): Access denied for user >> 'untz'@'localhost' (using password: YES) >> mysql> >> Can anyone please help me? I am unable to use MySQL at all, at >> this point... >> -untz > You have to be logged-in to mysql as a privileged user to grant > permissions to others. > Logout, and login as root. > > > > > -- > Gerald L. Clark > Supplier Systems Corporation > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql? > [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Gerald, I tried this and it still didn't work! Raven:~ untz$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 223 to server version: 5.0.16-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant super privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'privileges on *.* to 'untz'@'localhost' identified by 'maddog'' at line 1 mysql> :( Kindest regards, Unnsse On Jun 11, 2007, at 1:28 PM, Gerald L. Clark wrote: untz wrote: Gerald, I tried this and still got an error! mysql> grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1045 (28000): Access denied for user 'untz'@'localhost' (using password: YES) mysql> Can anyone please help me? I am unable to use MySQL at all, at this point... -untz You have to be logged-in to mysql as a privileged user to grant permissions to others. Logout, and login as root. -- Gerald L. Clark Supplier Systems Corporation -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
untz wrote: Gerald, I tried this and still got an error! mysql> grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1045 (28000): Access denied for user 'untz'@'localhost' (using password: YES) mysql> Can anyone please help me? I am unable to use MySQL at all, at this point... -untz You have to be logged-in to mysql as a privileged user to grant permissions to others. Logout, and login as root. -- Gerald L. Clark Supplier Systems Corporation -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Symantec Mail Security detected prohibited content in a message sent from your address (SYM:24166981753914768421)
I get this everytime I post to the mysql mailing list? On Jun 11, 2007, at 1:26 PM, <[EMAIL PROTECTED]> wrote: Subject of the message: Re: Access Denied When Trying to Create Database Recipient of the message: "mysql@lists.mysql.com" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Mikhail, I just tried what you suggested and got this: mysql> grant super privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'privileges on *.* to 'untz'@'localhost' identified by 'maddog'' at line 1 Many, many thanks, untz On Jun 11, 2007, at 1:21 PM, Mikhail Berman wrote: Looks like words "privileges on" are missing from GRANT statement you used Should be "grant super privileges on *.* to 'untz'@'localhost' identified by 'password'; Not "grant super *.* to 'untz'@'localhost' identified by 'password';" Regards, Mikhail Berman -Original Message- From: untz [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 4:02 PM To: Ananda Kumar Cc: mysql@lists.mysql.com Subject: Re: Access Denied When Trying to Create Database Ananda, Thank you for responding! I just tried this and got the following: mysql> grant super *.* to 'untz'@'localhost' identified by 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*.* to [EMAIL PROTECTED] identified by password' at line 1 Can anyone please help me? I am not a DBA Kindest regards, untz On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote: Is this a user "untz" going to do even the "create procedure", if yes then you need to grant "super" previliege to this user. grant super on *.* to 'untz'@'localhost' identified by 'password'; regards anandkl On 6/11/07, untz <[EMAIL PROTECTED]> wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; +--- - --- --+ | Grants for [EMAIL PROTECTED] | +--- - --- --+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' +--- - --- --+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: Hi untz, untz wrote: Hello there, I am using MySQL 5 on OS X Tiger... After starting the server, I tried to create a sample database and this is what what happened: $ mysql -u untz -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 to server version: 5.0.16-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database people_development; ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to database 'people_development' mysql> Try running SHOW GRANTS while logged in, and see what privileges you have. You probably need to grant your user some additional privileges. Cheers Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Gerald, I tried this and still got an error! mysql> grant all privileges on *.* to 'untz'@'localhost' identified by 'maddog'; ERROR 1045 (28000): Access denied for user 'untz'@'localhost' (using password: YES) mysql> Can anyone please help me? I am unable to use MySQL at all, at this point... -untz On Jun 11, 2007, at 1:06 PM, Gerald L. Clark wrote: untz wrote: Ananda, Thank you for responding! I just tried this and got the following: mysql> grant super *.* to 'untz'@'localhost' identified by 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*.* to [EMAIL PROTECTED] identified by password' at line 1 Can anyone please help me? I am not a DBA Kindest regards, untz On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote: Is this a user "untz" going to do even the "create procedure", if yes then you need to grant "super" previliege to this user. grant super on *.* to 'untz'@'localhost' identified by 'password'; regards anandkl On 6/11/07, untz <[EMAIL PROTECTED]> wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; +-- -- --- --+ | Grants for [EMAIL PROTECTED] | +-- -- --- --+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' +-- -- --- --+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: > Hi untz, > > untz wrote: >> Hello there, >> I am using MySQL 5 on OS X Tiger... >> After starting the server, I tried to create a sample database and >> this is what what happened: >> $ mysql -u untz -p >> Enter password: >> Welcome to the MySQL monitor. Commands end with ; or \g. >> Your MySQL connection id is 4 to server version: 5.0.16-standard >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. >> mysql> create database people_development; >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to >> database 'people_development' >> mysql> > > Try running SHOW GRANTS while logged in, and see what privileges > you have. You probably need to grant your user some additional > privileges. > > Cheers > Baron > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql? > [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] The show grants you ran shows you the proper syntax. -- Gerald L. Clark Supplier Systems Corporation -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Access Denied When Trying to Create Database
Looks like words "privileges on" are missing from GRANT statement you used Should be "grant super privileges on *.* to 'untz'@'localhost' identified by 'password'; Not "grant super *.* to 'untz'@'localhost' identified by 'password';" Regards, Mikhail Berman -Original Message- From: untz [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 4:02 PM To: Ananda Kumar Cc: mysql@lists.mysql.com Subject: Re: Access Denied When Trying to Create Database Ananda, Thank you for responding! I just tried this and got the following: mysql> grant super *.* to 'untz'@'localhost' identified by 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*.* to [EMAIL PROTECTED] identified by password' at line 1 Can anyone please help me? I am not a DBA Kindest regards, untz On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote: > Is this a user "untz" going to do even the "create procedure", if > yes then > you need to grant "super" previliege to this user. > > grant super on *.* to 'untz'@'localhost' identified by 'password'; > > regards > anandkl > > On 6/11/07, untz <[EMAIL PROTECTED]> wrote: >> >> Baron & Prathima, >> >> Thank for the information! >> >> What happened is that I hadn't used MySQL for a long time and looked >> up on the Internet on how to change my root and individual users' >> passwords. >> >> The last command the URL had me type was "flush privileges;" and once >> I did that, I think it created a problem for everything else. >> >> Here's what I got when I ran SHOW GRANTS: >> >> mysql> show GRANTS; >> + >> --- >> --+ >> | Grants for >> [EMAIL PROTECTED] >> | >> + >> --- >> --+ >> | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD >> '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' >> | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' >> | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' >> | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' >> | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' >> | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' >> | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' >> + >> --- >> --+ >> 7 rows in set (0.00 sec) >> >> What am I supposed to do? I can not run queries or even create >> tables... >> >> I also tried using a MySQL client (CocoaMySQL) and it displayed the >> same error as in the previous e-mail (see below). >> >> Am really stuck on this so any help, suggestions, etc. would be >> greatly appreciated! >> >> Sincerely yours, >> >> untz >> >> On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: >> >> > Hi untz, >> > >> > untz wrote: >> >> Hello there, >> >> I am using MySQL 5 on OS X Tiger... >> >> After starting the server, I tried to create a sample database and >> >> this is what what happened: >> >> $ mysql -u untz -p >> >> Enter password: >> >> Welcome to the MySQL monitor. Commands end with ; or \g. >> >> Your MySQL connection id is 4 to server version: 5.0.16-standard >> >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. >> >> mysql> create database people_development; >> >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to >> >> database 'people_development' >> >> mysql> >> > >> > Try running SHOW GRANTS while logged in, and see what privileges >> > you have. You probably need to grant your user some additional >> > privileges. >> > >> > Cheers >> > Baron >> > >> > -- >> > MySQL General Mailing List >> > For list archives: http://lists.mysql.com/mysql >> > To unsubscribe:http://lists.mysql.com/mysql? >> > [EMAIL PROTECTED] >> > >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe:http://lists.mysql.com/mysql? >> [EMAIL PROTECTED] >> >> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
untz wrote: Ananda, Thank you for responding! I just tried this and got the following: mysql> grant super *.* to 'untz'@'localhost' identified by 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*.* to [EMAIL PROTECTED] identified by password' at line 1 Can anyone please help me? I am not a DBA Kindest regards, untz On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote: Is this a user "untz" going to do even the "create procedure", if yes then you need to grant "super" previliege to this user. grant super on *.* to 'untz'@'localhost' identified by 'password'; regards anandkl On 6/11/07, untz <[EMAIL PROTECTED]> wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; + --- --+ | Grants for [EMAIL PROTECTED] | + --- --+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' + --- --+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: > Hi untz, > > untz wrote: >> Hello there, >> I am using MySQL 5 on OS X Tiger... >> After starting the server, I tried to create a sample database and >> this is what what happened: >> $ mysql -u untz -p >> Enter password: >> Welcome to the MySQL monitor. Commands end with ; or \g. >> Your MySQL connection id is 4 to server version: 5.0.16-standard >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. >> mysql> create database people_development; >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to >> database 'people_development' >> mysql> > > Try running SHOW GRANTS while logged in, and see what privileges > you have. You probably need to grant your user some additional > privileges. > > Cheers > Baron > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql? > [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] The show grants you ran shows you the proper syntax. -- Gerald L. Clark Supplier Systems Corporation -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Ananda, Thank you for responding! I just tried this and got the following: mysql> grant super *.* to 'untz'@'localhost' identified by 'password'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*.* to [EMAIL PROTECTED] identified by password' at line 1 Can anyone please help me? I am not a DBA Kindest regards, untz On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote: Is this a user "untz" going to do even the "create procedure", if yes then you need to grant "super" previliege to this user. grant super on *.* to 'untz'@'localhost' identified by 'password'; regards anandkl On 6/11/07, untz <[EMAIL PROTECTED]> wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; + --- --+ | Grants for [EMAIL PROTECTED] | + --- --+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' + --- --+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: > Hi untz, > > untz wrote: >> Hello there, >> I am using MySQL 5 on OS X Tiger... >> After starting the server, I tried to create a sample database and >> this is what what happened: >> $ mysql -u untz -p >> Enter password: >> Welcome to the MySQL monitor. Commands end with ; or \g. >> Your MySQL connection id is 4 to server version: 5.0.16-standard >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. >> mysql> create database people_development; >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to >> database 'people_development' >> mysql> > > Try running SHOW GRANTS while logged in, and see what privileges > you have. You probably need to grant your user some additional > privileges. > > Cheers > Baron > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql? > [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe 100% CPU: how to kill it? On Linux
2007/6/11, Ananda Kumar <[EMAIL PROTECTED]>: try mysqladmin shutdown I've tried but nothing is happens: the "mysqld_safe" process is always to 100% -- Scripts: http://www.spacemarc.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: determining if tables are being used
Just speaking as a newbie who has no idea what he is talking about ... If nobody suggests anything better ... I've noticed that there is a clear correspondence between table names and the files that MySQL keeps, i.e. [EMAIL PROTECTED] dashley]# ls -al /var/lib/mysql/fboprimedevel/ total 7832 drwx-- 2 mysql mysql4096 Nov 5 2006 . drwxr-xr-x 13 mysql mysql4096 Jun 11 01:07 .. -rw-rw 1 mysql mysql 65 Mar 4 2006 db.opt -rw-rw 1 mysql mysql8940 Nov 5 2006 loge.frm -rw-rw 1 mysql mysql 2359444 Jun 11 11:47 loge.MYD -rw-rw 1 mysql mysql 105472 Jun 11 11:47 loge.MYI -rw-rw 1 mysql mysql9322 Nov 5 2006 resv.frm -rw-rw 1 mysql mysql 5146108 Nov 5 2006 resv.MYD -rw-rw 1 mysql mysql 160768 Nov 6 2006 resv.MYI -rw-rw 1 mysql mysql8948 Nov 5 2006 rscs.frm -rw-rw 1 mysql mysql1944 Nov 20 2006 rscs.MYD -rw-rw 1 mysql mysql2048 Nov 21 2006 rscs.MYI -rw-rw 1 mysql mysql9178 Nov 5 2006 sess.frm -rw-rw 1 mysql mysql 904 Jun 8 01:01 sess.MYD -rw-rw 1 mysql mysql2048 Jun 8 01:04 sess.MYI -rw-rw 1 mysql mysql9930 Nov 5 2006 usrs.frm -rw-rw 1 mysql mysql 109464 Jun 5 15:58 usrs.MYD -rw-rw 1 mysql mysql8192 Jun 5 20:02 usrs.MYI The atimes or mtimes of the files may give you some information. Dave. On 6/11/07, Keith Murphy <[EMAIL PROTECTED]> wrote: I have inherited database servers from a group whose main job was not working on mysql. I am not certain if all the tables on the databases are being used. Is there some efficient way of determining if a table is being accessed or when the last time it was accessed? Thanks, Keith -- Keith Murphy Database Administrator iContact 2635 Meridian Parkway, 2nd Floor Durham, North Carolina 27713 (o) 919-433-0786 (c) 850-637-3877
Re: Insert into multiple tables using auto_increment reference
On 6/11/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi, Hamish Allan wrote: > Hi, > > Is it possible to insert values into two tables simultaneously and > have the value of one of the columns in the second table be the > auto_increment value from inserting into the first? No, because you can only insert into one table at a time. But you can write a stored procedure to do this. Thanks! H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Insert into multiple tables using auto_increment reference
Hi, Hamish Allan wrote: Hi, Is it possible to insert values into two tables simultaneously and have the value of one of the columns in the second table be the auto_increment value from inserting into the first? No, because you can only insert into one table at a time. But you can write a stored procedure to do this. Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to get Number of rows matched?
Yes, you are right! mysql_info() is not most useful. It does give me number of rows matched but will involve complications of parsing the string. Is there no other way to this? How can this be missed? I am not so convinienced on mysql_info()! On 6/11/07, Jerry Schwartz <[EMAIL PROTECTED]> wrote: Have you looked at mysql_info()? The format of the return value might not be the most useful, but it should give you what you need. Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -Original Message- > From: ViSolve DB Team [mailto:[EMAIL PROTECTED] > Sent: Monday, June 11, 2007 6:15 AM > To: Ace; mysql@lists.mysql.com > Subject: Re: how to get Number of rows matched? > > Hi > > AFAIK, before changing data, the old values are saved in the rollback > segment. > On saving the updated values, from the Buffer to the rollback > segment/data > files, > --- it checks if there is any matched row that matches the > condition. If > found, then flags "Matched". > ---after filtering out the matched row, it check whether > there is need to > change the old value to new value. if need then flags > "Changed" and rewrite > the same in the datafile/rollback segment. > > > Thanks > ViSolve DB Team. > - Original Message - > From: "Ace" <[EMAIL PROTECTED]> > To: > Sent: Monday, June 11, 2007 11:41 AM > Subject: how to get Number of rows matched? > > > > Hi Experts, > > > > When issuing updates in mysql (in the console window), > mysql will tell > > you if any rows matched and how many rows were updated (see > below). I > > know how to get number of rows udpated using > mysql_affected_rows(), but is > > there any > > way to get the number of rows matched? I want to find out, > when rows > > updated = 0, if there were no updates because the row wasn't found > > (rows matched will = 0) or because the update would not have changed > > any data (rows matched = 1). > > > > mysql> select * from test; > > +--+--+ > > | roll | s| > > +--+--+ > > |1 | new | > > +--+--+ > > 1 row in set (0.00 sec) > > > > mysql> update test set roll = 1, s = 'new' where roll = 1; > > Query OK, 0 rows affected (0.00 sec) > > Rows matched: 1 Changed: 0 Warnings: 0 > > > > mysql> update test set roll = 1, s = 'new' where roll = 17; > > Query OK, 0 rows affected (0.00 sec) > > Rows matched: 0 Changed: 0 Warnings: 0 > > > > mysql> update test set roll = 1, s = 'neww' where roll = 1; > > Query OK, 1 row affected (0.00 sec) > > Rows matched: 1 Changed: 1 Warnings: 0 > > > > -- > > Cheers, > > Rajan > > > > > -- > -- > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.472 / Virus Database: 269.8.13/843 - Release > Date: 6/10/2007 > 1:39 PM > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > >
Insert into multiple tables using auto_increment reference
Hi, Is it possible to insert values into two tables simultaneously and have the value of one of the columns in the second table be the auto_increment value from inserting into the first? E.g. if table1 has an auto_increment column c1, the logic I'm looking for would be something like: INSERT INTO table1(c2, c3, c4), table2(c5, c6, c7) VALUES ('v1', 'v2', 'v3', table1.c1, 'v4', 'v5'); where table2.c5 is a reference to table1.c1. Thanks, Hamish -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
determining if tables are being used
I have inherited database servers from a group whose main job was not working on mysql. I am not certain if all the tables on the databases are being used. Is there some efficient way of determining if a table is being accessed or when the last time it was accessed? Thanks, Keith -- Keith Murphy Database Administrator iContact 2635 Meridian Parkway, 2nd Floor Durham, North Carolina 27713 (o) 919-433-0786 (c) 850-637-3877
Re: How to set table-specific privileges
On Mon, 11 Jun 2007, Mahmoud Badreddine wrote: > Hello, > I am trying to revoke all privileges from a user on a certain table in a > database. > I want the user to continue to have all his/her privileges intact for the > other tables though. > > I used the statement "REVOKE ALL PRIVILEGES on dbName.tableName from > thisUser"; > > But that doesn't seem to change anything. > The message always gives "Query 0K, 0 rows affected..." > What could I be missing. I seem to remember that this always says 0 rows affected. To make sure the privilege changes stick, follow that up with: mysql> FLUSH PRIVILEGES; That should do the trick. Gordan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to set table-specific privileges
Hello, I am trying to revoke all privileges from a user on a certain table in a database. I want the user to continue to have all his/her privileges intact for the other tables though. I used the statement "REVOKE ALL PRIVILEGES on dbName.tableName from thisUser"; But that doesn't seem to change anything. The message always gives "Query 0K, 0 rows affected..." What could I be missing. Thank you. -- http://www.spreadfirefox.com/
RE: how to get Number of rows matched?
Have you looked at mysql_info()? The format of the return value might not be the most useful, but it should give you what you need. Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -Original Message- > From: ViSolve DB Team [mailto:[EMAIL PROTECTED] > Sent: Monday, June 11, 2007 6:15 AM > To: Ace; mysql@lists.mysql.com > Subject: Re: how to get Number of rows matched? > > Hi > > AFAIK, before changing data, the old values are saved in the rollback > segment. > On saving the updated values, from the Buffer to the rollback > segment/data > files, > --- it checks if there is any matched row that matches the > condition. If > found, then flags "Matched". > ---after filtering out the matched row, it check whether > there is need to > change the old value to new value. if need then flags > "Changed" and rewrite > the same in the datafile/rollback segment. > > > Thanks > ViSolve DB Team. > - Original Message - > From: "Ace" <[EMAIL PROTECTED]> > To: > Sent: Monday, June 11, 2007 11:41 AM > Subject: how to get Number of rows matched? > > > > Hi Experts, > > > > When issuing updates in mysql (in the console window), > mysql will tell > > you if any rows matched and how many rows were updated (see > below). I > > know how to get number of rows udpated using > mysql_affected_rows(), but is > > there any > > way to get the number of rows matched? I want to find out, > when rows > > updated = 0, if there were no updates because the row wasn't found > > (rows matched will = 0) or because the update would not have changed > > any data (rows matched = 1). > > > > mysql> select * from test; > > +--+--+ > > | roll | s| > > +--+--+ > > |1 | new | > > +--+--+ > > 1 row in set (0.00 sec) > > > > mysql> update test set roll = 1, s = 'new' where roll = 1; > > Query OK, 0 rows affected (0.00 sec) > > Rows matched: 1 Changed: 0 Warnings: 0 > > > > mysql> update test set roll = 1, s = 'new' where roll = 17; > > Query OK, 0 rows affected (0.00 sec) > > Rows matched: 0 Changed: 0 Warnings: 0 > > > > mysql> update test set roll = 1, s = 'neww' where roll = 1; > > Query OK, 1 row affected (0.00 sec) > > Rows matched: 1 Changed: 1 Warnings: 0 > > > > -- > > Cheers, > > Rajan > > > > > -- > -- > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.472 / Virus Database: 269.8.13/843 - Release > Date: 6/10/2007 > 1:39 PM > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Maximizing number of connections per client session
On Mon, 11 Jun 2007, Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem wrote: > REcently my mysql server has been overload with a lot > of connections; in fact losing the mysql.user table and > one whole database. Define "losing". You lost access, or the tables got corrupted? > How can this be prevented? If your load is so high that the whole system is grinding to a halt, that indicates one or more of the following: 1) Your database isn't configured properly. 1.1) This may mean you have to allocate more memory to it in my.conf, but more likely, 1.2) you either have a poorly designed query somewhere in the calling code, or most likely 1.3) a missing index on a frequently used table 2) Your server isn't up to the job Have you enabled logging of slow queries in my.conf to see what queries are taking a lot of time to execute? What table type are you using? Is your data access mainly reads, mainly writes, or a combination of both? If it's both, you may benefit from using InnoDB tables instead of MyISAM, assuming this isn't what you are doing already. The first thing to find is what queries are taking up a lot of resources and making sure they are running fully indexed, and/or possibly changing the data structure to better suit the query requirements. Gordan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Building RPMs with ICC
Hi, I'm trying to build the RPMs with ICC, but I'm not having a lot of luck. I saw the documentation for what paremeters are used to combile the tar balled binaries, but can anyone give me some guidance on how to get the RPMs to build? The distributions I want to build for are CentOS 5.0 / x86_64 and RedHat 9 / pentium3. At the moment I have tried the following: export CC=icc export CXX=icpc export MYSQL_BUILD_PATH=$PATH export CPATH=/path/to/my/icc/includes export LIBRARY_PATH=/path/to/my/icc/lib Added ICC libs to ld.so.conf Changed parameters on icc in ~/.rpmrc: optflags: x86_64 -O3 -march=pentium4 -mtune=pentium4 -mcpu=pentium4 -msse3 -xP -no-gcc -restrict -ip -mp -funroll-loops which is pretty close to the documented example. I had to add the -march/-mtune/-mcpu parameters because it looks like the default Makefile somewhere was trying to substitute x86_64 in there, and this is not a valid value for ICC v9.1 (thus causing it to abort). Instead it now just issues a warning and says that it is overriding pentium4 with -msse3, but proceeds with building. Then I tried: rpmbuild --define "__cc icc" --rebuild MySQL-6.0.0-0.glibc23.src.rpm Then things fail at various points. Then I doctored the rpm file to exclude building of NDB, InnoDB and most other optional DB engines (I only really require MyISAM, but I'm tryign to be a bit future facing so I'm usiong 6.0 instead of 5.x). Eventually I get a segfault from the linker and static mysqld library fails to build, at which point the process dies. Is there any more detailed guidance available for building RPMs with ICC? Many thanks. Gordan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Maximizing number of connections per client session
REcently my mysql server has been overload with a lot of connections; in fact losing the mysql.user table and one whole database. How can this be prevented? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to get Number of rows matched?
ok...That I know but I need it to check in my code... On 6/11/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote: Hi Simple.. The query "feedback" will depict the matched & changed numbers. mysql> update test set roll = 1, s = 'new' where roll = 1; Query OK, 0 rows affected (0.00 sec) * Rows matched: 1 Changed: 0 Warnings: 0 * Thanks ViSolve DB Team. - Original Message - From: "Ace" <[EMAIL PROTECTED]> To: "ViSolve DB Team" <[EMAIL PROTECTED]> Cc: Sent: Monday, June 11, 2007 5:04 PM Subject: Re: how to get Number of rows matched? > Ok..thanks! But my problem here is how to check if there were any matched > rows when no rows were changed. mysql_affected_rows() will tell me the > affected rows. Simmly, is there any routine using which one can know if > there were any matched rows? > > Cheers, > Rajan > > On 6/11/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote: >> >> Hi >> >> AFAIK, before changing data, the old values are saved in the rollback >> segment. >> On saving the updated values, from the Buffer to the rollback segment/data >> files, >> --- it checks if there is any matched row that matches the condition. If >> found, then flags "Matched". >> ---after filtering out the matched row, it check whether there is need to >> change the old value to new value. if need then flags "Changed" and >> rewrite >> the same in the datafile/rollback segment. >> >> >> Thanks >> ViSolve DB Team. >> - Original Message - >> From: "Ace" <[EMAIL PROTECTED]> >> To: >> Sent: Monday, June 11, 2007 11:41 AM >> Subject: how to get Number of rows matched? >> >> >> > Hi Experts, >> > >> > When issuing updates in mysql (in the console window), mysql will tell >> > you if any rows matched and how many rows were updated (see below). I >> > know how to get number of rows udpated using mysql_affected_rows(), but >> is >> > there any >> > way to get the number of rows matched? I want to find out, when rows >> > updated = 0, if there were no updates because the row wasn't found >> > (rows matched will = 0) or because the update would not have changed >> > any data (rows matched = 1). >> > >> > mysql> select * from test; >> > +--+--+ >> > | roll | s| >> > +--+--+ >> > |1 | new | >> > +--+--+ >> > 1 row in set (0.00 sec) >> > >> > mysql> update test set roll = 1, s = 'new' where roll = 1; >> > Query OK, 0 rows affected (0.00 sec) >> > Rows matched: 1 Changed: 0 Warnings: 0 >> > >> > mysql> update test set roll = 1, s = 'new' where roll = 17; >> > Query OK, 0 rows affected (0.00 sec) >> > Rows matched: 0 Changed: 0 Warnings: 0 >> > >> > mysql> update test set roll = 1, s = 'neww' where roll = 1; >> > Query OK, 1 row affected (0.00 sec) >> > Rows matched: 1 Changed: 1 Warnings: 0 >> > >> > -- >> > Cheers, >> > Rajan >> > >> >> >> >> >> >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 >> 1:39 PM >> >> > -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 1:39 PM
Re: how to get Number of rows matched?
Hi Simple.. The query "feedback" will depict the matched & changed numbers. mysql> update test set roll = 1, s = 'new' where roll = 1; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 Thanks ViSolve DB Team. - Original Message - From: "Ace" <[EMAIL PROTECTED]> To: "ViSolve DB Team" <[EMAIL PROTECTED]> Cc: Sent: Monday, June 11, 2007 5:04 PM Subject: Re: how to get Number of rows matched? > Ok..thanks! But my problem here is how to check if there were any matched > rows when no rows were changed. mysql_affected_rows() will tell me the > affected rows. Simmly, is there any routine using which one can know if > there were any matched rows? > > Cheers, > Rajan > > On 6/11/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote: >> >> Hi >> >> AFAIK, before changing data, the old values are saved in the rollback >> segment. >> On saving the updated values, from the Buffer to the rollback segment/data >> files, >> --- it checks if there is any matched row that matches the condition. If >> found, then flags "Matched". >> ---after filtering out the matched row, it check whether there is need to >> change the old value to new value. if need then flags "Changed" and >> rewrite >> the same in the datafile/rollback segment. >> >> >> Thanks >> ViSolve DB Team. >> - Original Message - >> From: "Ace" <[EMAIL PROTECTED]> >> To: >> Sent: Monday, June 11, 2007 11:41 AM >> Subject: how to get Number of rows matched? >> >> >> > Hi Experts, >> > >> > When issuing updates in mysql (in the console window), mysql will tell >> > you if any rows matched and how many rows were updated (see below). I >> > know how to get number of rows udpated using mysql_affected_rows(), but >> is >> > there any >> > way to get the number of rows matched? I want to find out, when rows >> > updated = 0, if there were no updates because the row wasn't found >> > (rows matched will = 0) or because the update would not have changed >> > any data (rows matched = 1). >> > >> > mysql> select * from test; >> > +--+--+ >> > | roll | s| >> > +--+--+ >> > |1 | new | >> > +--+--+ >> > 1 row in set (0.00 sec) >> > >> > mysql> update test set roll = 1, s = 'new' where roll = 1; >> > Query OK, 0 rows affected (0.00 sec) >> > Rows matched: 1 Changed: 0 Warnings: 0 >> > >> > mysql> update test set roll = 1, s = 'new' where roll = 17; >> > Query OK, 0 rows affected (0.00 sec) >> > Rows matched: 0 Changed: 0 Warnings: 0 >> > >> > mysql> update test set roll = 1, s = 'neww' where roll = 1; >> > Query OK, 1 row affected (0.00 sec) >> > Rows matched: 1 Changed: 1 Warnings: 0 >> > >> > -- >> > Cheers, >> > Rajan >> > >> >> >> >> >> >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 >> 1:39 PM >> >> > No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 1:39 PM
Re: Access Denied When Trying to Create Database
Hi, I think you need to log in as root and grant yourself some privileges then. If you have lost the root password or root doesn't have privileges anymore either, there is a chapter in the manual on how to do this: http://dev.mysql.com/ Cheers Baron untz wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; +-+ | Grants for [EMAIL PROTECTED] | +-+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' +-+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: Hi untz, untz wrote: Hello there, I am using MySQL 5 on OS X Tiger... After starting the server, I tried to create a sample database and this is what what happened: $ mysql -u untz -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 to server version: 5.0.16-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database people_development; ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to database 'people_development' mysql> Try running SHOW GRANTS while logged in, and see what privileges you have. You probably need to grant your user some additional privileges. Cheers Baron --MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Baron Schwartz http://www.xaprb.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Access Denied When Trying to Create Database
Is this a user "untz" going to do even the "create procedure", if yes then you need to grant "super" previliege to this user. grant super on *.* to 'untz'@'localhost' identified by 'password'; regards anandkl On 6/11/07, untz <[EMAIL PROTECTED]> wrote: Baron & Prathima, Thank for the information! What happened is that I hadn't used MySQL for a long time and looked up on the Internet on how to change my root and individual users' passwords. The last command the URL had me type was "flush privileges;" and once I did that, I think it created a problem for everything else. Here's what I got when I ran SHOW GRANTS: mysql> show GRANTS; +--- --+ | Grants for [EMAIL PROTECTED] | +--- --+ | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C' | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost' | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost' +--- --+ 7 rows in set (0.00 sec) What am I supposed to do? I can not run queries or even create tables... I also tried using a MySQL client (CocoaMySQL) and it displayed the same error as in the previous e-mail (see below). Am really stuck on this so any help, suggestions, etc. would be greatly appreciated! Sincerely yours, untz On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote: > Hi untz, > > untz wrote: >> Hello there, >> I am using MySQL 5 on OS X Tiger... >> After starting the server, I tried to create a sample database and >> this is what what happened: >> $ mysql -u untz -p >> Enter password: >> Welcome to the MySQL monitor. Commands end with ; or \g. >> Your MySQL connection id is 4 to server version: 5.0.16-standard >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. >> mysql> create database people_development; >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to >> database 'people_development' >> mysql> > > Try running SHOW GRANTS while logged in, and see what privileges > you have. You probably need to grant your user some additional > privileges. > > Cheers > Baron > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql? > [EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to get Number of rows matched?
Ok..thanks! But my problem here is how to check if there were any matched rows when no rows were changed. mysql_affected_rows() will tell me the affected rows. Simmly, is there any routine using which one can know if there were any matched rows? Cheers, Rajan On 6/11/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote: Hi AFAIK, before changing data, the old values are saved in the rollback segment. On saving the updated values, from the Buffer to the rollback segment/data files, --- it checks if there is any matched row that matches the condition. If found, then flags "Matched". ---after filtering out the matched row, it check whether there is need to change the old value to new value. if need then flags "Changed" and rewrite the same in the datafile/rollback segment. Thanks ViSolve DB Team. - Original Message - From: "Ace" <[EMAIL PROTECTED]> To: Sent: Monday, June 11, 2007 11:41 AM Subject: how to get Number of rows matched? > Hi Experts, > > When issuing updates in mysql (in the console window), mysql will tell > you if any rows matched and how many rows were updated (see below). I > know how to get number of rows udpated using mysql_affected_rows(), but is > there any > way to get the number of rows matched? I want to find out, when rows > updated = 0, if there were no updates because the row wasn't found > (rows matched will = 0) or because the update would not have changed > any data (rows matched = 1). > > mysql> select * from test; > +--+--+ > | roll | s| > +--+--+ > |1 | new | > +--+--+ > 1 row in set (0.00 sec) > > mysql> update test set roll = 1, s = 'new' where roll = 1; > Query OK, 0 rows affected (0.00 sec) > Rows matched: 1 Changed: 0 Warnings: 0 > > mysql> update test set roll = 1, s = 'new' where roll = 17; > Query OK, 0 rows affected (0.00 sec) > Rows matched: 0 Changed: 0 Warnings: 0 > > mysql> update test set roll = 1, s = 'neww' where roll = 1; > Query OK, 1 row affected (0.00 sec) > Rows matched: 1 Changed: 1 Warnings: 0 > > -- > Cheers, > Rajan > No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 1:39 PM
Re: keyboard-ONLY problem with mysql-client and UTF8; compilation flags?
On 10 jun 2007, at 20.47, tAndRead wrote: Hi all, when I try to add a foreign text from the keyboard in the mysql client, keystrokes are ignored! unless they are numbers, commas etc (using kde-konsole with the the DeJaVu international font) I believe this has to do something with the compilation and not configuration; because if I use the mysql-client rpm packages from SUSE 10.2, the keyboard works ok in interactive mysql sessions! Any ideas will be very much appreciated! This is probably a problem with your terminal program. I've had similar problems with other apps. -- "Home is not where you are born, but where your heart finds peace" - Tommy Nordgren, "The dying old crone" [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to get Number of rows matched?
Hi AFAIK, before changing data, the old values are saved in the rollback segment. On saving the updated values, from the Buffer to the rollback segment/data files, --- it checks if there is any matched row that matches the condition. If found, then flags "Matched". ---after filtering out the matched row, it check whether there is need to change the old value to new value. if need then flags "Changed" and rewrite the same in the datafile/rollback segment. Thanks ViSolve DB Team. - Original Message - From: "Ace" <[EMAIL PROTECTED]> To: Sent: Monday, June 11, 2007 11:41 AM Subject: how to get Number of rows matched? Hi Experts, When issuing updates in mysql (in the console window), mysql will tell you if any rows matched and how many rows were updated (see below). I know how to get number of rows udpated using mysql_affected_rows(), but is there any way to get the number of rows matched? I want to find out, when rows updated = 0, if there were no updates because the row wasn't found (rows matched will = 0) or because the update would not have changed any data (rows matched = 1). mysql> select * from test; +--+--+ | roll | s| +--+--+ |1 | new | +--+--+ 1 row in set (0.00 sec) mysql> update test set roll = 1, s = 'new' where roll = 1; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> update test set roll = 1, s = 'new' where roll = 17; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update test set roll = 1, s = 'neww' where roll = 1; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 -- Cheers, Rajan No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.13/843 - Release Date: 6/10/2007 1:39 PM -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_safe 100% CPU: how to kill it? On Linux
try mysqladmin shutdown On 6/11/07, spacemarc <[EMAIL PROTECTED]> wrote: Hi when I stop mysql server with "sudo /etc/init.d/mysql stop" the "mysqld_safe" process go to 100% of CPU and I must to kill it manually. What's happens? Ho can I stop it without killing? -- Scripts: http://www.spacemarc.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_safe 100% CPU: how to kill it? On Linux
Hi when I stop mysql server with "sudo /etc/init.d/mysql stop" the "mysqld_safe" process go to 100% of CPU and I must to kill it manually. What's happens? Ho can I stop it without killing? -- Scripts: http://www.spacemarc.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]