mysqldump w/o password
Hi All I have to run this to dump the database mysqldump -u root -pPASS --opt database database.tmp Is there anyway I can hide the PASS is a file ? I was trying to put it in /root/.my.cnf as this [client] password = PASS That seems to be not working. I am not sure if mysqldump even reads that file. The only option worked for me is putting the password in a file /root/.pass and chmod it to 000 and then run this mysqldump -u root -p`cat /root/.pass` --opt database database.tmp However I don't like this option because it tells you where the password is residing. I need to put this in cron so I don't like the option of showing the filename Thanks -- Asif Iqbal http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0x8B686E08 There's no place like 127.0.0.1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: images on database
The most common problem in such cases is that the webserver doesn't know what MIME Type the file is and so it doesn't know how to send it. If you are using PHP to upload and later show that image on the web, i could give you the code for the scripts and the structure of the table containg the binary data. Luiz Rafael Culik Guimaraes said: Dear Friends I has images saved on an mysql table as an blob field, but i could not recreate the image as file by selecting an specific record of this field any ideia Regards Luiz -- If you don't like the news, go out and make some on your own. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Formatted double value...
Hello It formats the output to ##,###,##.## . I dont want the commas and also I dont know what maximum decimal value is there in the table. It may be .001 or it maybe .001 . I just want them in simple expanded form. karam --- Roger Baklund [EMAIL PROTECTED] wrote: * Karam Chand I have a column with double values like - .01 .02 .03 Well...its sounds ridiculous but i do have data like that :) I am using C API to get the resultset, but the data is resturned as ( also with mysql client which uses C API ). |1e-006 | |2e-006 | |3e-006 | |4e-006 | |5e-006 | |6e-006 | | 8 | |8e-006 | Is there any way wherein I can get data like .01, .02 etc. Maybe the FORMAT() function will do what you want: URL: http://www.mysql.com/doc/en/Miscellaneous_functions.html#IDX1391 -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: table is read only after copying table files to new server
Hi Bennett I had a similar problem on my system a while back. With my particular case, the problem was the the default priv's on the new server for it's users did NOT include INSERT rights. Basically what I'm saying is: these are the reasons for a table to be (or appear to be) read-only: 1) Table files belong to someone other than mysql ( not the case here) 2) The permissions on the files are set read-only ( do a chmod to the correct permissions you require) 3)the user for that database has no insert, update, delete etc, rights. For the last case you need to issue the correct grants, or you can edit the mysql user table directly and change the N to Y in the appropriate fields. Then you should probably restart the mysqld daemon. On Sun, 2003-08-17 at 01:16, Bennett Haselton wrote: I'm trying to port my MySQL tables for a database called tracerlock from one server to another. On the old server, in the /var/lib/mysql/tracerlock directory, there was a .MYD, .MYI and .frm file for every table in the database. So after creating a database called tracerlock on the new server, I copied these files over to the /var/lib/mysql/tracerlock directory on the new server. On both servers, all the table files are owned by user mysql in the mysql group. Now, when I connect to MySQL on the new machine and load the tracerlock database, show tables shows all the tables as expected, and I can perform SELECT statements on them and get the correct results. But when I try doing INSERT statements on one of the tables that was copied over, I get: mysql INSERT INTO test VALUES(3); ERROR 1036: Table 'test' is read only However, if I create a new table called test2, I can perform INSERT statements on it with no error: mysql insert into test2 values(3); Query OK, 1 row affected (0.00 sec) The files corresponding to test and test2 have the same permissions and ownership, so that's not it: -rw-rw1 mysqlmysql 20 Aug 15 21:22 test.MYD -rw-rw1 mysqlmysql1024 Aug 15 21:22 test.MYI -rw-rw1 mysqlmysql8556 Aug 15 21:22 test.frm -rw-rw1 mysqlmysql 5 Aug 16 19:13 test2.MYD -rw-rw1 mysqlmysql1024 Aug 16 19:13 test2.MYI -rw-rw1 mysqlmysql8556 Aug 16 19:13 test2.frm So how do I get rid of the error that Table 'test' is read only? -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 497 9002 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Socket Missing
Hi there, This is my first message to this mailing list. I just upgraded Mysql from 3.23.54 to 4.0.14. Everything were fine after the upgrade, but I experienced something strange: - When I telnet to the localhost, the response says 3.23.54 is running. - However, when I do a mysqladmin -V, it shows 4.0.14 - I tried to log into mysql, the connection refused and there was a error 2002. Of course, the socket is missing. - When I locate the mysql.sock file, it showed that the file is under /var/lib/mysql, when I cd to that directory, no socket file can be found. Fortunately the server is still up and running. However I'm confused with the installation. Could someone give me a hand. Thanks a lot in advance. Rainer
Re: Fwd: Dynamic enabling of log files
Thanks neils! i have gone thru what u referred long before, i know that this set method is not fully supported in 3.23 version, thats why i posed this question, i wanted to know whether there is any other way to do it. when i make changes to my.cnf file i am able to do it but it is not immediatly reflected since mysqld reads from the my.cnf file only when it restarts i thought there must be some sort of command line utility or ... to enable and disabke log files without restarting the server. can u also tell me from what version onwards is this type of dynamic setting for log files allowed. Regards, Prem S --- Nils Valentin [EMAIL PROTECTED] wrote: Hi Prem, That question was just here 2 days ago, so easy to answer. ;-) Logs can be enabled/disabled for the session with SET SQL_LOG_OFF | SQL_LOG_BIN | SQL_LOG_UPDATE. But these commands are not supported in v3.23.52: http://www.mysql.com/doc/en/SET_OPTION.html Best regards Nils Valenin Tokyo/Japan 2003年 8月 13日 水曜日 13:30、Prem Soman さんは書きました: Note: forwarded message attached. Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/ -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP or Perl?
Hi Where to start For a pure web system, I would recommend PHP. It is smaller, faster and interfaces better with apache. This was its design goal. For a non web system, it has to be PERL. For a mixed system, I would again favour Perl, due to its flexibilty and power. I am currently working on a system with a few friends and we have chosen to write it in Perl. The prototype was written in Php, and was well received, but the production copy had to move to perl. We had so much code that we had to duplicate between web and backend systems, that Perl was the only viable option. The code uses several libraries, accessed from modperl, cgi and standalone perl apps. Finally, the standard interface that Perl offers for databases, DBI, makes writing MySQL/Perl applications much easy. I hope this helps Simon On Saturday 16 August 2003 06:17, Mark Healey wrote: As part of my own learning mysql project I'm planning to build databases for all my books and DVD's. Stephen Hawking is probably a better typist than I am so I plan to use barcodes to get the info ,taking the information from various web sites. People tell me that PHP is THE way to do database work with mysql. The thing is, I'm familiar with Perl and it has all kinds of neat string manipulation stuff and LWP. Does PHP have comprable libraries (especially LWP) and how difficult is it to move from Perl. I hope I don't start a relegious war here I just want some advice. Mark Healey [EMAIL PROTECTED] This account is only for lists to which I've subscribed. Any spammers invite the worst revenge I think I can get away with. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- Simon Windsor Eml: [EMAIL PROTECTED] Tel: 01454 617689 Mob: 07720 447385 -- This message has been scanned for viruses and dangerous content by MailScanner, http://www.mailscanner.info, 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: images on database
Hi The most common problem in such cases is that the webserver doesn't know what MIME Type the file is and so it doesn't know how to send it. If you are using PHP to upload and later show that image on the web, i could give you the code for the scripts and the structure of the table containg the binary data. yes, i´m using php 4.1 Regards Luiz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Mysql: check Innodb autoextend
Hi, Is there any possibility to check existing of autoextend option for InnoDB ? I mean by any sql command and not by searching in my.ini file ? Regards, Dmitry -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Formatted double value...
* Karam Chand [...] Is there any way wherein I can get data like .01, .02 etc. * Roger Baklund Maybe the FORMAT() function will do what you want: * Karam Chand It formats the output to ##,###,##.## . I dont want the commas and also I dont know what maximum decimal value is there in the table. It may be .001 or it maybe .001 . I just want them in simple expanded form. Try combining FORMAT() with TRIM(): USE test; CREATE TABLE floattest (f1 DOUBLE); INSERT INTO floattest VALUES (0.0001),(0.002),(0.3); SELECT TRIM(BOTH '0' FROM FORMAT(f1,18)) f1 FROM floattest; ++ | f1 | ++ | .0001 | | .002 | | .3 | ++ 3 rows in set (0.00 sec) URL: http://www.mysql.com/doc/en/String_functions.html#IDX1211 Note that DOUBLE (and FLOAT and REAL) are approximate numeric types, you need to decide on a precission when displaying the number. In the above example I used FORMAT(f1,18), which works fine on my computer, but it might not work on a different computer. If I increase the precission to 21, it breaks on my computer: SELECT TRIM(BOTH '0' FROM FORMAT(f1,21)) f1 FROM floattest; ++ | f1 | ++ | .0001 | | .002 | | .30001 | ++ 3 rows in set (0.00 sec) URL: http://www.mysql.com/doc/en/Problems_with_float.html If you also need to remove commas, you can add the REPLACE() function to the party: SELECT REPLACE(TRIM(BOTH '0' FROM FORMAT(f1,18)),',','') f1 FROM floattest; URL: http://www.mysql.com/doc/en/String_functions.html#IDX1214 -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Newbie SELECT Question
We are having problems with what we think is a simple select statement: select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); First, we are running an older version of MySQL: mysql select version(); +--+ | version()| +--+ | 3.23.22-beta-log | +--+ 1 row in set (0.00 sec) First, we create a table: CREATE TABLE ATTRIBUTE ( ENTITY int(10) unsigned NOT NULL, NAME varchar(64) NOT NULL, TYPE varchar(8), VALUE text, UNIT varchar(12), READONLY char(1), ENTERED timestamp(14), UPDATED timestamp(14), PRIMARY KEY (ENTITY,NAME) ); Next we populate it so it contains the following data: mysql select ENTITY, NAME, VALUE from ATTRIBUTE; ++---+-+ | ENTITY | NAME | VALUE | ++---+-+ |128 | Age | 7 | |128 | FavoriteFood | Sandwich| |128 | FavoriteSport | Tennis | |127 | Age | 5 | |127 | FavoriteFood | Peanuts | |127 | FavoriteSport | Hockey | |125 | FavoriteFood | Tacos | |125 | Age | 7 | |125 | FavoriteSport | Lacrosse| |124 | FavoriteFood | Hamburgers | |124 | Age | 8 | |124 | FavoriteSport | Soccer | |122 | FavoriteSport | Tennis | |122 | Age | 7 | |122 | FavoriteFood | Sandwich| |118 | FavoriteSport | Soccer | |118 | Age | 6 | |118 | FavoriteFood | CornDogs| |119 | FavoriteSport | Swimming| |119 | Age | 8 | |119 | FavoriteFood | Salad | |121 | FavoriteSport | Hockey | |121 | Age | 5 | |121 | FavoriteFood | Ice Cream | ++---+-+ 24 rows in set (0.01 sec) Now we want a list of entities that have an attribute named 'FavoriteSport' and a value of 'Soccer': mysql select ENTITY from ATTRIBUTE where NAME='FavoriteSport' and VALUE='Soccer'; ++ | ENTITY | ++ |124 | |118 | ++ 2 rows in set (0.01 sec) Now get a list of entities that have an attribute named 'FavoriteFood' and a value of 'CornDogs': mysql select ENTITY from ATTRIBUTE where (NAME='FavoriteFood' and VALUE='CornDogs'); ++ | ENTITY | ++ |118 | ++ 1 row in set (0.01 sec) Apparently ENTITY 118 has both a favorite sport of Soccer and a favorite food of CornDogs because it appears on the result list for each of the queries. Finally, let's try to get a list of entities that have both a favorite sport of Soccer and a favorite food of CornDogs with just one query: mysql select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); Empty set (0.00 sec) This isn't what we expect. We should see ENTITY 118 appear in the result list since the previous two queries returned ENTITY 118. What single query will return just the records that both sets (NAME VALUE) of tests? -Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Newbie SELECT Question
Steve Cote wrote: We are having problems with what we think is a simple select statement: select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); You are trying to find a row with a NAME value of 'FavoriteSport' and 'FavoriteFood' at the same time, also with a VALUE value of 'Soccer' and 'CornDogs' at the same time. This can't work. Here's a query that does what you want: SELECT a1.ENTITY FROM ATTRIBUTE a1, ATTRIBUTE a2 WHERE a1.ENTITY = a2.ENTITY AND a1.NAME='FavoriteSport' and a1.VALUE='Soccer' AND a2.NAME='FavoriteFood' and a2.VALUE='CornDogs' [...] Finally, let's try to get a list of entities that have both a favorite sport of Soccer and a favorite food of CornDogs with just one query: mysql select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); Empty set (0.00 sec) This isn't what we expect. We should see ENTITY 118 appear in the result list since the previous two queries returned ENTITY 118. What single query will return just the records that both sets (NAME VALUE) of tests? [...] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: images on database
Checkout: http://php.dreamwerx.net/forums/viewtopic.php?t=6 It's got streaming code.. What I do is if the type is unknown I always send application/octet-stream and the browser usually identifies it.. Or check the file extension for the file in the database, and apply content type based on that.. On Sun, 17 Aug 2003, [iso-8859-1] ÃåùñãéÜäçò Ãéþñãïò wrote: The most common problem in such cases is that the webserver doesn't know what MIME Type the file is and so it doesn't know how to send it. If you are using PHP to upload and later show that image on the web, i could give you the code for the scripts and the structure of the table containg the binary data. Luiz Rafael Culik Guimaraes said: Dear Friends I has images saved on an mysql table as an blob field, but i could not recreate the image as file by selecting an specific record of this field any ideia Regards Luiz -- If you don't like the news, go out and make some on your own. -- 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: Newbie SELECT Question
Steve select ENTITY from ATTRIBUTE where (NAME='FavoriteSport' and Steve VALUE='Soccer') and (NAME='FavoriteFood' and VALUE='CornDogs'); Steve Empty set (0.00 sec) Just analyze the query. You asked for a record in which name = 'FavoriteSport' AND name = 'FavoriteFood' which is always false because name can not be both 'FavoriteSport' and 'FavoriteFood' at the same time. One of the possible solutions (not so good) is this: select a.entity from attribute a, attribute b where a.entity = b.entity and a.NAME='FavoriteSport' and a.VALUE='Soccer' and b.NAME='FavoriteFood' and b.VALUE='CornDogs'; or you can upgrade to 4.1 and do this select entity from attribute where NAME='FavoriteSport' and VALUE='Soccer' and entity in (select entity from attribute where NAME='FavoriteFood' and VALUE='CornDogs'); in the near future (i think in 5.x tree) you will be able to intersect two queries select ... INTERSECT select ...; select ENTITY from ATTRIBUTE where NAME='FavoriteSport' and VALUE='Soccer' INTERSECT select ENTITY from ATTRIBUTE where NAME='FavoriteFood' and VALUE='CornDogs'; Or you can do it through script or something like that Ivan __ One World, one Web, one Program -- Microsoft promotional ad Ein Volk, ein Reich, ein Fuhrer -- Adolf Hitler __ http://alas.matf.bg.ac.yu/~mr02014 ___ _ _ _ __ ___ _ / __/___ __ | __| _ _ ___ \ / _/ / . / _\/\ | _| \ \/ / ._\ Ivan Cukic, Form Eye 2003. \ /_/ /___/_/ /_/_/_/ |___|_\ /\___ web development and design / __ / _ _ __ ___ / -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem installing MySQL v4.0.14b
Hi, I have just downloaded MySQLv4.0.14b for windows and 21% through the installation, it displays the following error: An error occurred during the move dataq process: -132 Component: File Group: File: The MD5 hash matches the one on your website and I have spent another 5 hours or so downloading it again from your main site instead of a mirror site, but it stills does the same thing. I'm installing it into the the same folder as the previous version (3.23.49). Could you tell me what I could possibly be doing wrong or of a way I could get around this, please? With Regards, Debbie Figg
Re: PHP or Perl? (or Rebol via TCP/IP)
I hope I don't start a relegious war here I just want some advice. Mark Healey [EMAIL PROTECTED] I program with C, C++, python and rebol. My partner use perl. We do lots of stuff with MySql. My hands-down favorite is rebol. I find more code-efficient than any other language that I have used in my career. And it delivers sizzling performance from mysql on a TCP/IP connection (rather than using shared binaries). Like perl, rebol is easy to get off the ground with and there are multiple ways to do anything. (including roll-your-own control structures). given rebol's performance, I'm going to investigate using C on a socket connection to MySql... Just my thoughts My brother is a project engineer with motorola they use lots of both rebol and perl. Perl for regex and rebol for socket work. Although I believe that you can harness regex directly with mysql, I haven't done anything more than simple blobs. -- Tim Johnson [EMAIL PROTECTED] http://www.alaska-internet-solutions.com http://www.johnsons-web.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Counting rows with same information
Hi there, I have a table containing my CD collection information, the simplified structure is following: id artist album 1 A.R.T The best of A.R.T 2 ATB Big Hits Collection 3 A.R.T My Artistic Life 4 A.R.T You are the only one How can I build up a query that will contain all CD's as well as a number of albums of each artist. Yes, I'd like to have that info with each row. So, the result would be something like that: id artist album albumsofartist 1 A.R.T The best of A.R.T 3 2 ATB Big Hits Collection 1 3 A.R.T My Artistic Life 3 4 A.R.T You are the only one 3 I've already tried this SELECT DISTINCT mh.*, COUNT(mh2.id) AS albumsofartist FROM cd.mh, cd.mh2 WHERE mh.artist= mh2.artist GROUP BY mh2.artist But it dosen't give correct results. Thanks for info, Ville M. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: table is read only after copying table files to new server
Thanks. Actually, my ISP helped me out and got this fixed. Here's what they wrote in the support log: Due to the method that the databases were copied over, I went into mysql used the grant option on all the databases to allow root access and ability to alter all the databases. Once this was done, I restarted mysql and I was able to run the example above. I had already run the command: grant all on tracerlock.test to bhaselto identified by password and that didn't work when I did it, but I didn't restart mysql after running the command. Probably it was the restart of MySQL that made the difference. By the way, if you're wondering what sort of ISP would have such good support that they would answer a question like this, it was RackSpace.com -- nothing but good things to say about their support process. -Bennett At 11:00 AM 8/17/2003 +0200, Petre Agenbag wrote: Hi Bennett I had a similar problem on my system a while back. With my particular case, the problem was the the default priv's on the new server for it's users did NOT include INSERT rights. Basically what I'm saying is: these are the reasons for a table to be (or appear to be) read-only: 1) Table files belong to someone other than mysql ( not the case here) 2) The permissions on the files are set read-only ( do a chmod to the correct permissions you require) 3)the user for that database has no insert, update, delete etc, rights. For the last case you need to issue the correct grants, or you can edit the mysql user table directly and change the N to Y in the appropriate fields. Then you should probably restart the mysqld daemon. On Sun, 2003-08-17 at 01:16, Bennett Haselton wrote: I'm trying to port my MySQL tables for a database called tracerlock from one server to another. On the old server, in the /var/lib/mysql/tracerlock directory, there was a .MYD, .MYI and .frm file for every table in the database. So after creating a database called tracerlock on the new server, I copied these files over to the /var/lib/mysql/tracerlock directory on the new server. On both servers, all the table files are owned by user mysql in the mysql group. Now, when I connect to MySQL on the new machine and load the tracerlock database, show tables shows all the tables as expected, and I can perform SELECT statements on them and get the correct results. But when I try doing INSERT statements on one of the tables that was copied over, I get: mysql INSERT INTO test VALUES(3); ERROR 1036: Table 'test' is read only However, if I create a new table called test2, I can perform INSERT statements on it with no error: mysql insert into test2 values(3); Query OK, 1 row affected (0.00 sec) The files corresponding to test and test2 have the same permissions and ownership, so that's not it: -rw-rw1 mysqlmysql 20 Aug 15 21:22 test.MYD -rw-rw1 mysqlmysql1024 Aug 15 21:22 test.MYI -rw-rw1 mysqlmysql8556 Aug 15 21:22 test.frm -rw-rw1 mysqlmysql 5 Aug 16 19:13 test2.MYD -rw-rw1 mysqlmysql1024 Aug 16 19:13 test2.MYI -rw-rw1 mysqlmysql8556 Aug 16 19:13 test2.frm So how do I get rid of the error that Table 'test' is read only? -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 497 9002 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.peacefire.org (425) 497 9002 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Join syntax diff 3.23 to 4.x?
Done. On Thu, 14 Aug 2003, Jack Dare wrote: Doh! You are so right. Thanks for the help. Got so used to not needing the INNER word that I forgot all about it. -Original Message- From: Kevin Fries [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 1:27 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Join syntax diff 3.23 to 4.x? Try changing JOIN list_states to INNER JOIN list_states Looks like the earlier version didn't like your (synonymous) wording. -Original Message- From: Jack Dare [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 8:35 AM To: [EMAIL PROTECTED] Subject: Join syntax diff 3.23 to 4.x? Is there something about 3.23 that makes this illegal? It is fine on 4.012. SELECT [lots of columns] FROM new_people p LEFT JOIN new_address ad ON p.address_id = ad.id JOIN list_states ls ON ad.state = ls.id WHERE p.company_id = 1 Will some minor rewording help it run on both versions OK? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- === Vladimir Dubnikov (Unix System Group) Computation center, Mount Scopus, Hebrew University of Jerusalem Tel:02-5883070 E-mail: [EMAIL PROTECTED] === -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Counting rows with same information
Hi, Sun, 17 Aug 2003 20:08:43 +0300 tarihinde Ville Mattila [EMAIL PROTECTED] soyle yazdi: VM I've already tried this VM SELECT DISTINCT mh.*, COUNT(mh2.id) AS albumsofartist FROM cd.mh, VM cd.mh2 WHERE mh.artist= mh2.artist GROUP BY mh2.artist VM But it dosen't give correct results. Try with COUNT(DISTINCT mh2.id) Doruk -- FISEK INSTITUTE - http://www.fisek.org -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem installing MySQL v4.0.14b
At 17:35 17/8/2003 +0100, Debbie wrote: Hi, Hi, I have just downloaded MySQLv4.0.14b for windows and 21% through the installation, it displays the following error: An error occurred during the move dataq process: -132 Component: File Group: File: The above frequently happens because the installer tries to write a file that is being using by another process (the re-write action is denied and then the installer aborts). Take a look if any other application is using, for example, the libmysql.dll, if the mysql.exe is running, etc. Stop the applications before the setup. The MD5 hash matches the one on your website and I have spent another 5 hours or so downloading it again from your main site instead of a mirror site, but it stills does the same thing. I'm installing it into the the same folder as the previous version (3.23.49). Could you tell me what I could possibly be doing wrong or of a way I could get around this, please? With Regards, Debbie Figg -- Regards, For technical support contracts, visit https://order.mysql.com/ Are you MySQL certified?, http://www.mysql.com/certification/ Miguel Angel Solórzano [EMAIL PROTECTED] São Paulo - Brazil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: table is read only after copying table files to new server
Bennett Haselton wrote: At 11:22 AM 8/17/2003 -0400, Rajesh Kumar wrote: Bennett Haselton wrote: I had already run the command: grant all on tracerlock.test to bhaselto identified by password and that didn't work when I did it, but I didn't restart mysql after running the command. Probably it was the restart of MySQL that made the difference. http://www.mysql.com/doc/en/Privilege_changes.html Otherwise, your changes will have no effect until you restart the server. If you change the grant tables manually but forget to reload the privileges, you will be wondering why your changes don't seem to make any difference! The page says that if you change the grant tables MANUALLY, you have to restart the server. I changed the grant tables using the GRANT syntax, and the page says: Modifications to the grant tables that you perform using GRANT, REVOKE, or SET PASSWORD are noticed by the server immediately -- no restart or flush is supposed to be required. Yes, That's exactly what I was wondering. I posted the link to you, because you said that it was probably because you restarted MySql, it worked. Which version are you running? When I execute grant statements, they usually work without any flush priveleges or a restarting of the server. But I always do these two steps, just to be on the safe side. You know, I wouldn't like some user be welcomed with an ugly message that goes Table is read-only. I will be the loser. But anyways.. as you've got your problem fixed, there is absolutely no worry, and this thread can be closed. -- No, but he says that all Gods are good :w _ Meet the guy at http://www.meetRajesh.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql and ESRI shape files
hello Please excuse the 'baby' question :) I have a 'digital dataset' of the streets and suburbs of my area (ESRI shape format). I used 'shp2mysql.pl' (from mapserv) to import the maps/layers into mysql, this worked fine EXCEPT for all the street maps...perhaps because they're vector line data as apposed to polygon or point data. How would the average mysql DBA import roads.shp, roads.dbf, roads.shx into mysql database? Thanks for the help Regards -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql and ESRI shape files
What is a dbf file? -Martin - Original Message - From: Bruce Bushby [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 17, 2003 1:40 PM Subject: mysql and ESRI shape files hello Please excuse the 'baby' question :) I have a 'digital dataset' of the streets and suburbs of my area (ESRI shape format). I used 'shp2mysql.pl' (from mapserv) to import the maps/layers into mysql, this worked fine EXCEPT for all the street maps...perhaps because they're vector line data as apposed to polygon or point data. How would the average mysql DBA import roads.shp, roads.dbf, roads.shx into mysql database? Thanks for the help Regards -- 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: PHP or Perl?
Hello I am no PHP expert but I find it quite easy to move from Perl to PHP. PHP too has a huge standard library with lots of useful functions and it has PEAR, something similar to CPAN. but when I develop MySQL appliction (mainly for myself at the moment) I use Python or Ruby. they are also easy to learn and are very clean languages. and Ruby is quite similar to Perl but fully OOP. and Ruby and Python also have great standard libraries. in Python there is for example urlib and urllib2 as a replacement for LWP. and Ruby also hat stuff for this in the standard library and the Ruby Application Archive. just my experiences. check out http://www.ruby-lang.org http://www.rubycentral.com http://www.python.org Markus On Sat, 2003-08-16 at 07:17, Mark Healey wrote: As part of my own learning mysql project I'm planning to build databases for all my books and DVD's. Stephen Hawking is probably a better typist than I am so I plan to use barcodes to get the info ,taking the information from various web sites. People tell me that PHP is THE way to do database work with mysql. The thing is, I'm familiar with Perl and it has all kinds of neat string manipulation stuff and LWP. Does PHP have comprable libraries (especially LWP) and how difficult is it to move from Perl. I hope I don't start a relegious war here I just want some advice. Mark Healey [EMAIL PROTECTED] This account is only for lists to which I've subscribed. Any spammers invite the worst revenge I think I can get away with. -- 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]
set up question
i have working install of 3.23.46. on one server. by working, i mean that i can get this far c:\mysql\binmysql mysqluse mysql and then run queries. on my other server, i have reloaded 3.23.57 back from 4.04b when i was having trouble with a php page not working, (failing on the query even though that same query worked directly on the database). i get this far only, mysql use mysql ERROR 1044: access denied for user: '@localhost' to database 'mysql' i'm happy to start all over again with a fresh install, (which i've now tried several times), but not sure what is going on. thank you. David Fair PowerSchool/Web Manager Galena City School District 907-562-4332 www.galenaalaska.org -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: set up question
David Fair wrote: i have working install of 3.23.46. on one server. by working, i mean that i can get this far c:\mysql\binmysql mysqluse mysql and then run queries. on my other server, i have reloaded 3.23.57 back from 4.04b when i was having trouble with a php page not working, (failing on the query even though that same query worked directly on the database). i get this far only, mysql use mysql ERROR 1044: access denied for user: '@localhost' to database 'mysql' i'm happy to start all over again with a fresh install, (which i've now tried several times), but not sure what is going on. You haven't logged in to mysql. Try this: c:\mysql\binmysql -u root -p Enter password: mysqluse mysql And now you shouldn't get an access denied messgae. Later you may want to create another login for yourself or change the root password. -- No, but he says that all Gods are good :w _ Meet the guy at http://www.meetRajesh.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Optimizing imports
Jackson Miller wrote: On Saturday 16 August 2003 4:41, Hans van Harten wrote: Depending on your exact needs, consider brutal overwrites: LOAD DATA CONCURRENT INFILE '...' REPLACE INTO TABLE Replaces 1 rows within 3.5 s into Innodb running MySQL-max-4.10 and WinXP on Celeron /400MHz/ for me. Is there a need for CONCURRENT when using InnoDB? Isn't that the default for InnoDB? True, CONCURRENT has no effect on InnoDB. I just grabbed a line of code and (made you) hit a tombstone: changed only recently to Innodb by 'default_table_type=innodb'. Everage response time dropped about 30% with bearly no effort. If not, does it lock the entire InnoDB table while the insert is running? Just to run a test, I repeated the 1 records 100 times in a single file and imported that bulk in about 195s. During these 3 minutes multiple queries from another PC were answerred -in about 30 times normal response-. That proofs the absence of table locks, I'ld say. However, I fear the near-hog of the CPU is of an even more nacking concern. Makes me consider to do INSERT DELAYED INTO tabel (column) VALUES (1),(2), ...(n) and throttle a 1000 rows at a minute interval. What is your current rate of records/sec and CPU-load while using single row INSERT ? How does it effect response time to normal clients ?? HansH -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Fwd: Dynamic enabling of log files
Hi Prem, Which version are you curently using 3.23.xxx ?? Whats the XXX in your version ??? What do the change log files say at the www.mysql.com homepage ? Best regards Nils Valentin Tokyo/Japan Prem Soman wrote: Thanks neils! i have gone thru what u referred long before, i know that this set method is not fully supported in 3.23 version, thats why i posed this question, i wanted to know whether there is any other way to do it. when i make changes to my.cnf file i am able to do it but it is not immediatly reflected since mysqld reads from the my.cnf file only when it restarts i thought there must be some sort of command line utility or ... to enable and disabke log files without restarting the server. can u also tell me from what version onwards is this type of dynamic setting for log files allowed. Regards, Prem S --- Nils Valentin [EMAIL PROTECTED] wrote: Hi Prem, That question was just here 2 days ago, so easy to answer. ;-) Logs can be enabled/disabled for the session with SET SQL_LOG_OFF | SQL_LOG_BIN | SQL_LOG_UPDATE. But these commands are not supported in v3.23.52: http://www.mysql.com/doc/en/SET_OPTION.html Best regards Nils Valenin Tokyo/Japan 2003 8 13 13:30?Prem Soman ???: Note: forwarded message attached. Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/ -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqldump w/o password
Hi Asif, Just a guess, but how about [mysqldump] password = PASS ?? Best regards Nils Valentin Tokto/Japan Asif Iqbal wrote: Hi All I have to run this to dump the database mysqldump -u root -pPASS --opt database database.tmp Is there anyway I can hide the PASS is a file ? I was trying to put it in /root/.my.cnf as this [client] password = PASS That seems to be not working. I am not sure if mysqldump even reads that file. The only option worked for me is putting the password in a file /root/.pass and chmod it to 000 and then run this mysqldump -u root -p`cat /root/.pass` --opt database database.tmp However I don't like this option because it tells you where the password is residing. I need to put this in cron so I don't like the option of showing the filename Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP or Perl?
People tell me that PHP is THE way to do database work with mysql. The thing is, I'm familiar with Perl and it has all kinds of neat string manipulation stuff and LWP. People have opinions. My personal opinion, but I think of PHP as Perl with all the warts filed off, but I also think they filed off a little too much. Most of the cutting edge development is still done in Perl, and the rought edges still show in places, and I think that's part of the reason many people prefer PHP. If you are just starting out with MySQL, I don't think you're going to find yourself playing with cutting edge libraries, however. If you know Perl, PHP is not going to be hard to pick up. But if you don't have a customer speccing PHP, go ahead and use Perl to learn MySQL so you aren't learning too many things at once. When you get a chance to pick up PHP and find yourself wondering where some library is, look at Pear (pear.php.net). Pear isn't CPAN, but it is becoming the umbrella project for libraries for PHP. Perl 6 and PHP 5 will have some rather drastic changes, which I am looking forward too. And Java can profitably be used with MySQL, and PostGreSQL can be mixed in at will, and ... -- Joel Rees, programmer, Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP or Perl?
The only advantage of PHP is that it runs faster than Perl which may be important if a lot of people are accessing your web page. Using mod_perl vs. mod_php? or perl with the CGI interface vs. mod_php? (I understand that using mod_perl introduces persistence problems when globals are not carefully used, and I have never seen those problems when using PHP, but that is less about speed than about programming.) -- Joel Rees, programmer, Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP or Perl?
The only and best careful way to use a global is not to use one at all!! At 11:38 AM 8/18/03 +0900, Joel Rees wrote: The only advantage of PHP is that it runs faster than Perl which may be important if a lot of people are accessing your web page. Using mod_perl vs. mod_php? or perl with the CGI interface vs. mod_php? (I understand that using mod_perl introduces persistence problems when globals are not carefully used, and I have never seen those problems when using PHP, but that is less about speed than about programming.) -- Joel Rees, programmer, Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] (250) 655 - 9513 (PST Time Zone) Inquiry is fatal to certainty. -- Will Durant -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Corrupt index = mysqld freeze?
On Thu, Aug 14, 2003 at 11:35:18AM -0700, Jennifer Goodie wrote: Setting skip-name-resolve will avoid this code path and the bug. It looks like some DNS funkyness... I've implented this and so far I can't get the box to hang in authentication no matter how mean I am to it. I feel so dumb, for not thinking of this before, I swore I had already done it about a year ago when all of the other boxes were set up to skip name-resolve. I'll post if I can get it to lock up again (let's hope I can't). I'll be impressed if you can. :-) I spent a while poking around in the code and couldn't find any other *obvious* ways it'd get stuck there. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.13: up 16 days, processed 847,688,622 queries (597/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Mysql: check Innodb autoextend
At 16:29 +0300 8/17/03, Dmitry Kosoy wrote: Hi, Is there any possibility to check existing of autoextend option for InnoDB ? I mean by any sql command and not by searching in my.ini file ? If you mean you want to find out the setting of the innodb_data_file_path variable, you can use this statement: mysql show variables like 'innodb_data_file_path'; +---+-+ | Variable_name | Value | +---+-+ | innodb_data_file_path | ibdata1:20M | +---+-+ Regards, Dmitry -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to make Database access fast
Hi Friends, In my linux server (LOCAL), accessing data through the PHP scripts from MySQL (3.23.41)tables, it is taking more time. Earlier it was very fast. Now a days some reports it is taking more than five minuits. Earlier it use to come with in a minuit. What may the problem and what I have to do spead up the process. Regards, Vinod. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to make Database access fast
best guess, you need some database maintence.. optimize table blah1, blah2, etc.. On Mon, 18 Aug 2003, Vinod Bhaskar wrote: Hi Friends, In my linux server (LOCAL), accessing data through the PHP scripts from MySQL (3.23.41)tables, it is taking more time. Earlier it was very fast. Now a days some reports it is taking more than five minuits. Earlier it use to come with in a minuit. What may the problem and what I have to do spead up the process. Regards, Vinod. -- 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]