mysql sql query size limit
Hi List, What is the practical limit on size of the sql query in mysql 4.1.x Anil
RE: Getting SQL errors porting databases between MySQL v4 and v5
Use --allow-keywords option with mysqldump command Anil -Original Message- From: Brian Mansell [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 11:18 PM To: Rob Tanner Cc: mysql@lists.mysql.com Subject: Re: Getting SQL errors porting databases between MySQL v4 and v5 The 'group' column needs to be quoted (use --quote-names with mysqldump). cheers, --bemansell On 3/26/07, Rob Tanner <[EMAIL PROTECTED]> wrote: > > Hi, > > I am porting over 6 databases from a MySQL v4 installation to a MySQL v5 > installation and getting an SQL error in the process. > > I am using the following command to dump the data in the v4 installation: > > mysqldump -u root --password=secret --add-drop-table --databases db1 db2 > db3 db4 db5 db6 > db.sql > > and using the following command to upload the databases on to the v5 > installation: > > mysql -u root -p < db.sql > > But then I get this error: > > > ERROR 1064 (42000) at line 140784: 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 'group varchar(5) default NULL, >PRIMARY KEY (id) > ) TYPE=MyISAM' at line 8 > > > The whole create table sequence from the db.sql file is: > > > DROP TABLE IF EXISTS admission_quotes; > CREATE TABLE admission_quotes ( >id int(4) NOT NULL auto_increment, >quote text, >author text, >category text, >class text, >active text, >group varchar(5) default NULL, >PRIMARY KEY (id) > ) TYPE=MyISAM; > > Any idea what the issue is? Is there something special I need to do when > porting the databases between MySQL v4 and v5? > > Thanks, > Rob > > > > -- > Rob Tanner > UNIX Services Manager > Linfield College, McMinnville OR > > > -- 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: mysqldumpslow output interpretation
Hi List, Any update on this Thanks Anil Hi List, Below is the output of mysqldumpslow. In the output query execution time is showing -ve value how to interpret the below output i.e how to interpret -ve value for query execution time please advice Count: 1 Time=4294967223.00s (-73s) Lock=0.00s (0s) Rows=0.0 (0), ebizb11[ebizb11]@ UPDATE MM_EMAIL,MM_GROUP SET MM_EMAIL.STATUS='S' WHERE MM_EMAIL.EMAILADD=lower('S') AND MM_GROUP.ID=MM_EMAIL.GROUPID AND MM_GROUP .DEPTID=N Count: 1 Time=4294967223.00s (-73s) Lock=0.00s (0s) Rows=0.0 (0), ebizb11[ebizb11]@ SELECT LIST.NAME,DEPT.NAME FROM MM_LIST LIST, MM_DEPARTMENT DEPT WHERE LIST.DEPTID=DEPT.ID AND LIST.LISTTYPE = 'S' AND LIST.STATUS = 'S' AND LIST.CREATEDDATE > DATE_SUB(NOW(),INTERVAL N DAY) Thanks Anil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Managing big mysqldump files
Hi List, We are facing a problem of managing mysqldump out put file which is currently of size 80 GB and it is growing daily by 2 - 3 GB, but we have a linux partition of only 90 GB.. Our backup process is first generate the mysqldump file of total database and then compress the dump file and remove the dump file. Is there any way to get compressed dump file instead of generating dump file and then compressing it later. Any ideas or suggestions please Thanks Anil
Mysql memory utilization
Hi list, We are facing memory problems for our application and to analyze memory utilization by application we require below information on mysql memory utilization. how much of RAM mysql is utilizing and amount of memory allocated for innodb buffer is utilizing ,how much of innodb buffer is free and amount of thread based buffers allocated. We are getting some information with " show innodb status " please let me know how to interpret the output . I am pasting output of " show innodb status " below for reference. Please give us detailed explanation how to interpret the output. = 060504 20:00:01 INNODB MONITOR OUTPUT = Per second averages calculated from the last 20 seconds -- SEMAPHORES -- OS WAIT ARRAY INFO: reservation count 522818462, signal count 504180146 Mutex spin waits 1363737867, rounds 305233322, OS waits 106732853 RW-shared spins 740792501, OS waits 360301857; RW-excl spins 45582064, OS waits 16212977 FILE I/O I/O thread 0 state: waiting for i/o request (insert buffer thread) I/O thread 1 state: waiting for i/o request (log thread) I/O thread 2 state: waiting for i/o request (read thread) I/O thread 3 state: waiting for i/o request (write thread) Pending normal aio reads: 0, aio writes: 0, ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 Pending flushes (fsync) log: 0; buffer pool: 0 383418129 OS file reads, 59580243 OS file writes, 9957395 OS fsyncs 10.10 reads/s, 27901 avg bytes/read, 3.30 writes/s, 2.10 fsyncs/s - INSERT BUFFER AND ADAPTIVE HASH INDEX - Ibuf for space 0: size 1, free list len 506, seg size 508, is empty Ibuf for space 0: size 1, free list len 506, seg size 508, 13076970 inserts, 13077112 merged recs, 2977056 merges Hash table size 2212699, used cells 679260, node heap has 796 buffer(s) 1161.94 hash searches/s, 984.85 non-hash searches/s --- LOG --- Log sequence number 89 54255649 Log flushed up to 89 54141193 Last checkpoint at 89 30596518 0 pending log writes, 0 pending chkp writes 2089244 log i/o's done, 1.30 log i/o's/second -- BUFFER POOL AND MEMORY -- Total memory allocated 61180; in additional pool allocated 20954624 Buffer pool size 32768 Free buffers 0 Database pages 31972 Modified db pages 5217 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages read 1455127697, created 6339651, written 91917358 17.20 reads/s, 5.10 creates/s, 18.00 writes/s Buffer pool hit rate 1000 / 1000 -- ROW OPERATIONS -- 2 queries inside InnoDB, 0 queries in queue Main thread process no. 12278, id 28680, state: sleeping Number of rows inserted 172622749, updated 475137381, deleted 45859392, read 4138993176 6.65 inserts/s, 370.98 updates/s, 0.00 deletes/s, 163055.10 reads/s END OF INNODB MONITOR OUTPUT ==== Thanks Anil
RE: connection issue
Than you very much . It is working Anil DBA -Original Message- From: Dobromir Velev [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 8:58 PM To: mysql@lists.mysql.com Cc: Anil Subject: Re: connection issue When you connect without specifing the host, the mysql client will try to connect using the mysql socket file (usually /tmp/mysql.sock or /var/lib/mysql/mysql.sock) and when you specify the IP address it will try to connect using a TCP connection to port 3306. My guess is the you have name lookups turned on. If this is the case mysql will try to resolve the IP address given and probably the 192.168.3.111 IP is not resolving properly. The solution for this is to a add a skip-name-resolve option to your MySQL configuration file. You might also check http://dev.mysql.com/doc/refman/5.0/en/dns.html and the related articles in the MySQL documentation HTH Dobromir Velev On Thursday 13 October 2005 15:38, Anil wrote: > Hi List, > > > > When I am trying to connect to mysql 4.0.20 database it is taking very long > time when I specified host like > > > > Mysql -ux -p -h192.168.3.111 > > > > But it is connecting very quickly when I tried like below > > > > Mysql -ux -p > > > > > > It is an urgent issue. Please help me. > > > > Thanks > > Anil > > DBA -- Dobromir Velev -- 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]
connection issue
Hi List, When I am trying to connect to mysql 4.0.20 database it is taking very long time when I specified host like Mysql -ux -p -h192.168.3.111 But it is connecting very quickly when I tried like below Mysql -ux -p It is an urgent issue. Please help me. Thanks Anil DBA
RE: problem with grant
Michael, Just I want to know if we grant privileges with '%' wild card character will it accept connection from 127.0.0.1. when I tried it is showing connection request is coming from [EMAIL PROTECTED] and connection is not establishing . to my knowledge '%' means it shouls accept connection from any host . please clarify Thanks Anil DBA -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 11:22 PM To: Anil Cc: mysql@lists.mysql.com Subject: Re: problem with grant Anil wrote: > HI, > > I have granted all privileges to a user to connect from any host like below > > grant all on *.* to [EMAIL PROTECTED] identified by 'password'; > flush privileges; Verify this worked with SHOW GRANTS FOR [EMAIL PROTECTED]; By the way, giving all privileges to a user who can connect from any machine in the world is probably not a good idea. > when I tried to connect to database using ip address like below on the > server where database was hosted > > mysql -u -p -h127.0.0.1 > > I am unable to connect to the database. Please anybody explain what was the > problem We cannot explain, because you have not told us what went wrong. Please provide the exact text of the error message you received (copy/paste). > Thanks > Anil > DBA Michael -- 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]
QUERY CACHE TUNING QUESTION
_ From: Anil [mailto:[EMAIL PROTECTED] Sent: Thursday, September 15, 2005 10:36 PM To: 'mysql@lists.mysql.com' Subject: QUERY CACHE TUNING QUESTION Hi list, We are using mysql 4.0.24 on RHEL 3.0 on dell 2650 machine with 2 gb RAM. We tried to fine tune query cache . please find below the analysis PARAMETER old modified == == query_cache_size 10 MB 32 MB Qcache_queries_in_cache 187 2444 Qcache_inserts 122668213560221 Qcache_hits 1510151 7380756 Qcache_lowmem_prunes 8501288096499 Qcache_not_cached2725692 16361318 Qcache_free_blocks 6512 Qcache_free_memory9.26 MB 28.79 MB qCACHE HIT RATE27.64% 19.78% QCACHE HIT RATE IS CALUCULATED WITH FORMULA = (Qcache_hits/(Qcache_inserts +Qcache_not_cached+Qcache_hits)) * 100 QCACHE HIT RATE IS CALUCULATED WITH FORMULA = (Qcache_hits/(Qcache_inserts +Qcache_not_cached+Qcache_hits)) * 100 As per the above analysis we observed that qcache hit rate came down after increasing query_cache_size from 10 MB to 32 MB and qcache_hits got increased but the remaining parameters Qcache_inserts, Qcache_not_cached, Qcache_lowmem_prunes also increased because of that hit rate came down drastically. We didn't understand the reason behind hit . Is there any recommended procedure to fine tune query cache . awaiting early reply from list. Thanks in advance Anil DBA
QUERY CACHE TUNING QUESTION
Hi list, We are using mysql 4.0.24 on RHEL 3.0 on dell 2650 machine with 2 gb RAM. We tried to fine tune query cache . please find below the analysis PARAMETER old modified == == query_cache_size 10 MB 32 MB Qcache_queries_in_cache 187 2444 Qcache_inserts 1226682 13560221 Qcache_hits 1510151 7380756 Qcache_lowmem_prunes850128 8096499 Qcache_not_cached 2725692 16361318 Qcache_free_blocks 65 12 Qcache_free_memory9.26 MB 28.79 MB qCACHE HIT RATE27.64% 19.78% QCACHE HIT RATE IS CALUCULATED WITH FORMULA = (Qcache_hits/(Qcache_inserts +Qcache_not_cached+Qcache_hits)) * 100 As per the above analysis we observed that qcache hit rate came down after increasing query_cache_size from 10 MB to 32 MB and qcache_hits got increased but the remaining parameters Qcache_inserts, Qcache_not_cached, Qcache_lowmem_prunes also increased because of that hit rate came down drastically. We didn't understand the reason behind hit . Is there any recommended procedure to fine tune query cache . awaiting early reply from list. Thanks in advance Anil DBA
problem with grant
HI, I have granted all privileges to a user to connect from any host like below grant all on *.* to [EMAIL PROTECTED] identified by 'password'; flush privileges; when I tried to connect to database using ip address like below on the server where database was hosted mysql -u -p -h127.0.0.1 I am unable to connect to the database. Please anybody explain what was the problem Thanks Anil DBA
Mysql crash due to page corruptions
Hi, We are using mysql 4.0.20 on RHEL3.0 with circular replication setup A ->B ->C ->A . A is the master and all operations will be happening on A. We are facing frequent mysql crash on Master with page corruption errors. How to identify which process is causing this page corruption. After restarting the mysql it is working fine. But we want to identify the process which is causing page corruption ,Any clues will be helpful for us. Thanks Anil DBA
RE: backup/restore
Hi, use the below command to take backup mysqldump --add-drop-table > i tested it on my local server also it is working fine for me. other wise just open the dump file by executing the below command on linux: head -100 o/p: -- MySQL dump 8.22 -- -- Host: localhostDatabase: NOCINFO - -- Server version 4.0.18-standard -- -- Table structure for table 'IPInfo' -- DROP TABLE IF EXISTS IPInfo; CREATE TABLE IPInfo ( IPAddr varchar(12) NOT NULL default '', PingStatus varchar(10) NOT NULL default '', ServerName varchar(25) NOT NULL default '', ReverseLook varchar(100) NOT NULL default '', ForwardLook varchar(12) default NULL, Remarks varchar(200) default NULL, SerId varchar(10) default NULL, PRIMARY KEY (IPAddr) ) TYPE=MyISAM MAX_ROWS=1000; check the above you will find drop table command in dumpfile. Thanks Anil -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 9:50 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. Even though I used the --add-drop-table option, I am getting the error messages. Actually I am taking the backup for a group of tables as following D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debug>mysqldump -uMNMSDBA -p MNMSDBA --databases mnms --add-drop-table --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO > c:\progra~1\mitel\opsman~1\temp\almhist.dmp And doing the restoring as D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debug>mysql -uMNMSDBA -pMNMS DBA -f mnms < c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1051 at line 11: Unknown table 'alarm'// Trying to drop alarm table ERROR 1050 at line 12: Table 'alarm' already exists //Creating alarm ERROR 1051 at line 72: Unknown table 'alarm_report' //Drop alarm_category ERROR 1050 at line 73: Table 'alarm_report' already exists//Create ERROR 1062 at line 94: Duplicate entry '1' for key 1 // Insert ERROR 1062 at line 95: Duplicate entry '4' for key 1 // Insert ERROR 1062 at line 96: Duplicate entry '5' for key 1 // Insert ERROR 1062 at line 97: Duplicate entry '8' for key 1 // Insert ERROR 1062 at line 98: Duplicate entry '10' for key 1 // Insert ERROR 1062 at line 99: Duplicate entry '11' for key 1 // Insert ERROR 1062 at line 100: Duplicate entry '13' for key 1 // Insert ERROR 1062 at line 101: Duplicate entry '15' for key 1 // Insert ERROR 1062 at line 102: Duplicate entry '16' for key 1 // Insert ERROR 1062 at line 103: Duplicate entry '17' for key 1 // Insert Note : ALARM, ALARM_CATEGORY, ALARM_REPORT, ALARM_REPORT_CATEGORY, ALARMINFO all belongs to one group. Alarm and Alarm_category are parent and child tables. ALARM_REPORT, ALARM_REPORT_CATEGORY are parent and child tables Please advise me, how to get rid of the above error messages. Thanks, Narasimha -Original Message- From: Anil Doppalapudi [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 7:03 PM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS); [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:58 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname < dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms < c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Dupl
RE: User can't login to his DB.
Hi, after granting privileges did you executed flush privileges command. if not execute below command and then check mysql> flush privileges; thanks Anil -Original Message- From: sam [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 9:09 AM To: mysql@lists.mysql.com Subject: User can't login to his DB. Hi list, I use the following commands to create a user hubert access to his DB only, but got the following error: # perl view.pl DBI connect('datacube','hubert',...) failed: Access denied for user 'hubert'@'localhost' (using password: YES) at view.pl line 8 Unable to connect: Access denied for user 'hubert'@'localhost' (using password: YES) SQL Grant commands: GRANT SHOW DATABASES ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'; GRANT SHOW DATABASES ON *.* TO hubert@'10.%' IDENTIFIED BY 'password'; GRANT ALL ON hubertsdb.* TO hubert; Perl DBI commands: $database = "datacube"; $username = "hubert"; $pw = "password"; $dbh = DBI->connect("DBI:mysql:$database",$username,$pw); die "Unable to connect: $DBI::errstr\n" unless (defined $dbh); What is wrong with this error and how to fix it? Thanks Sam -- 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: backup/restore
Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:58 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname < dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms < c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR 1062 at line 155: Duplicate entry '56' for key 1 ERROR 1062 at line 156: Duplicate entry '57' for key 1 ERROR 1062 at line 157: Duplicate entry '58' for key 1 ERROR 1062 at line 158: Duplicate entry '59' for key 1 ERROR 1062 at line 159: Duplicate entry '75' for key 1 ERROR 1062 at line 160: Duplicate entry '76' for key 1 ERROR 1062 at line 161: Duplicate entry '77' for key 1 Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO > c:\progra~1\mitel\opsman~1\temp\almhist.dmp Please help me in this. Thanks, Narasimha -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:55 AM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) Cc: mysql@lists.mysql.com Subject: RE: backup/restore [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname < mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases ---tables table1 table2 > dump.dmp For restore : used Mysqldump -databases < dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- 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: Need more info about currently running queries
may be due to corrupted indexes it is taking long time. just re-org the table.if your table is InnoDB type then use below command to re-org it. mysql> alter table <> type=InnoDB; based on size of the table it may execute for long time . for us it has solved performance issue. Thanks Anil -Original Message- From: Greg Fortune [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 1:34 AM To: mysql@lists.mysql.com Subject: Re: Need more info about currently running queries Yep, mysqladmin can give the same info. As noted in my original message, I need much more detailed info. The crux of the problem is that I need to run a query that could take several hours when it's using indexes correctly, but it is not working correctly so it takes longer than I've been willing to wait (about 14 hours). I need to make changes to indexes and run the query again, but I don't want to wait hours until I know whether the change was effective or not. I really need a way to find out how far the query has progressed after 15 minutes so I can calculate how much improvement the changes made. Greg On Tuesday 21 December 2004 02:25 am, Gleb Paharenko wrote: > Hello. > > > > Using SHOW PROCESSLIST you can just check if your query running, or > > is waiting for some lock. For more info, you can run "ps axm" in shell > > and look for the thread state, but that's more related to the kernel stuff. > > See: > > http://dev.mysql.com/doc/mysql/en/SHOW_PROCESSLIST.html > > Greg Fortune <[EMAIL PROTECTED]> wrote: > > Is there anyway to get additional information about a query that is > > currently > > > > running? I've got some performance problems I'm trying to analyze while > > > > loading large data sets and I'm running a test query, but I don't have > > any > > > > idea how far the query has progressed. > > > > > > > > The test query is a count(some_field) with the JOINs that I need and I'd > > like > > > > to know how many rows it has counted or how many rows it has visited from > > > > each table, etc, etc, etc. I know ahead of time that the result should > > be > > > > about 2.6 million and am just trying to get timing data. > > > > > > > > Is there any way to get at this kind of info? > > > > > > > > Greg > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.NET http://www.ensita.net/ >__ ___ ___ __ > / |/ /_ __/ __/ __ \/ /Gleb Paharenko > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ><___/ www.mysql.com -- 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: myql command-line no warning
after executing command. use the below command to know the warnings it is throwing mysql> show warnings; Thanks Anil -Original Message- From: Qunfeng [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 10:45 AM To: Paul DuBois; mysql@lists.mysql.com Subject: Re: myql command-line no warning :-) I see. Thanks! It w(not vv)orks!!! Qunfeng At 10:48 PM 12/21/2004, Paul DuBois wrote: >At 20:44 -0600 12/21/04, Qunfeng wrote: >>Paul, >> >>Thanks for your reply. I tried >> >>mysql -p -w DB < test.sql >> >>still no warning. >> >>I tried -vw >>it simply echo the sql statement, no warning. > >I didn't suggest using -w or -vw. I suggested -vv (two v's) or >-vvv (three -v's). > >> >>Qunfeng >> >>At 05:45 PM 12/21/2004, Paul DuBois wrote: >>>At 17:43 -0600 12/21/04, Qunfeng wrote: >>>>Hi, >>>> >>>>I am using mysql 4.1 on linux. >>>> >>>>When I execute an mysql command (e.g., UPDATE statement) at the mysql >>>>prompt, it gives me warning if something is not running correctly. >>>>e.g., >>>>mysql> update testTable set col='abcd' where col='ab'; >>>>Query OK, 0 rows affected (0.0 sec) >>>>Rows matched: 2 Changed: 0 Warnings: 2 >>>> >>>> >>>>However, if I put the same command into a file and run mysql >>>>command-line, no warning or any message was given. I have no idea if >>>>there is anything wrong or how many records got changed. >>>>$ mysql -p DB < test.sql >>>> >>>>Is there any way I can show the warning and message? >>> >>>Try increasing the verbosity level, for example, with -vv or -vvv. > > >-- >Paul DuBois, MySQL Documentation Team >Madison, Wisconsin, USA >MySQL AB, www.mysql.com -- 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: mysqldump and innodb - set foreign_key_checks=0
just write the below lines of code to a file in the location where your mysqldump file exists SET FOREIGN_KEY_CHECKS = 0; SOURCE <>; SET FOREIGN_KEY_CHECKS = 1; then execute the following command mysql < <> Thanks Anil DBA -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 8:15 PM To: mysql@lists.mysql.com Subject: Re: mysqldump and innodb - set foreign_key_checks=0 Terence, - Original Message - From: "Terence" <[EMAIL PROTECTED]> Newsgroups: mailing.database.myodbc Sent: Wednesday, December 22, 2004 5:58 AM Subject: mysqldump and innodb - set foreign_key_checks=0 > Hi, > > After reading the docs I realise that in order to use mysqldump with > innodb tables i need to include > > SET FOREIGN_KEY_CHECKS=0; > > at the top of my dump file. Is there anyway to do this when my slave > starts up or some other way. The dump file is huge and it takes ages to > open and put the line at the top. (In trying to setup replication I am > trying all ways to reduce the downtime of the master while I get a > snapshot onto the slave) > > I use > ./bin/mysql -u root -p < /tmp/dump.sql > to get the contents into my slave. > > Something like this might work: > ./bin/mysql -u root -p -e "SET FOREIGN_KEY_CHECKS=0;" < /tmp/dump.sql in 4.1, mysqldump puts that SET FOREIGN_KEY_CHECKS=0; automatically to the dump file. > Grateful for and ideas ... > > Thanks Best regards and Season's Greetings, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php Order MySQL technical support from https://order.mysql.com/ -- 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: Restore help! been going 2 weeks
ours is InnoDB. we are not getting any performance problems with the settings. it is working fine since last 1 Year. to my knowledge due to myisam type you are getting performance issue. Thanks Anil -Original Message- From: matt_lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 7:12 PM To: Anil Doppalapudi Cc: mysql@lists.mysql.com Subject: Re: Restore help! been going 2 weeks Those are pretty much standard settings I had ours set almost exactly like that, and performance was worse -- 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: Regarding User creation and loading data
use root user of mysql. u wont get any privilege restrictions with root user. other wise the user you are using should have file privilege to load data from file or to write to a file Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 5:19 PM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Cc: [EMAIL PROTECTED] Subject: RE: Regarding User creation and loading data Hi, Thank you for your reply. When I log in as a DBA user and try to load data from a file, I am getting an error as "Access Denied", so, here I want to know what type of permissions I have to give for a user to load data infile form a file. Thanks, Narasimha -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 1:35 AM To: mysql@lists.mysql.com Subject: Re: Regarding User creation and loading data Hello. What error have you got? Send us compete command that you issued and the error message. >Could any one of you help me in creating two users like First user with >all dba privileges as root and the Second user with only dml operations. For root user use: grant all privileges on *.* to 'vasja'@'vasinhost' identified by 'vasinpass' with grant option; For dml user use something like this: grant select,insert,update,delete on test.* to 'dml'@'localhost' identified by 'v'; See: http://dev.mysql.com/doc/mysql/en/GRANT.html >And in loading data using LOAD DATA INFILE, if I use the file full path, >I am getting error. And if I put the file in mysql\bin it is executing. >How to load a dta in a file which is located in some other directories. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- 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: Restore help! been going 2 weeks
here is my my.cnf file contents # The MySQL server [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking key_buffer = 384M max_allowed_packet = 1M table_cache = 512 sort_buffer_size = 2M read_buffer_size = 2M myisam_sort_buffer_size = 64M thread_cache = 40 query_cache_size = 32M max_connections = 500 # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 wait_timeout = 288000 # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # #skip-networking # Replication Master Server (default) # binary logging is required for replication Added by Anil For Replication server-id = 1 log-bin=/usr/local/mysql/data/extended/neptune-bin.1 set-variable=max_binlog_size=500M # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted #server-id = 1 # Replication Slave (comment out master section to use this) # # To configure this host as a replication slave, you can choose between # two methods : # # 1) Use the CHANGE MASTER TO command (fully described in our manual) - #the syntax is: # #CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=, #MASTER_USER=, MASTER_PASSWORD= ; # #where you replace , , by quoted strings and # by the master's port number (3306 by default). # #Example: # #CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, #MASTER_USER='joe', MASTER_PASSWORD='secret'; # # OR # # 2) Set the variables below. However, in case you choose this method, then #start replication for the first time (even unsuccessfully, for example #if you mistyped the password in master-password and the slave fails to #connect), the slave will create a master.info file, and any later #change in this file to the variables' values below will be ignored and #overridden by the content of the master.info file, unless you shutdown #the slave server, delete master.info and restart the slaver server. #For that reason, you may want to leave the lines below untouched #(commented) and instead use CHANGE MASTER TO (see above) # # required unique id between 2 and 2^32 - 1 # (and different from the master) # defaults to 2 if master-host is set # but will not function as a slave if omitted #server-id = 2 # # The replication master for this slave - required #master-host = # # The username the slave will use for authentication when connecting # to the master - required #master-user = # # The password the slave will authenticate with when connecting to # the master - required #master-password = # # The port the master is listening on. # optional - defaults to 3306 #master-port = # # binary logging - not required for slaves, but recommended #log-bin # Point the following paths to different dedicated disks #tmpdir = /tmp/ tmpdir = /home/mysql/tmp/ #log-update = /path-to-dedicated-directory/hostname # Uncomment the following if you are using BDB tables #bdb_cache_size = 384M #bdb_max_lock = 10 # Uncomment the following if you are using InnoDB tables innodb_data_home_dir = /usr/local/mysql/data/ innodb_data_file_path = ibdata1:4000M;ibdata2:4000M;ibdata3:4000M;ibdata4:4000M;ibdata5:4000M;ibdata 6:4000M;ibdata7:4000M;ibdata8:4000M;ibdata9:4000M;ibdata10:4000M;ibdata11:40 00M;ibdata12:4000M;extended/ibdata13:4000M;extended/ibdata14:4000M;extended/ ibdata15:4000M;extended/ibdata16:4000M;extended/ibdata17:4000M;extended/ibda ta18:4000M;extended/ibdata19:4000M;extended/ibdata20:4000M;extended/ibdata21 :4000M;extended/ibdata22:4000M innodb_log_group_home_dir = /usr/local/mysql/data/ innodb_log_arch_dir = /usr/local/mysql/data/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high innodb_buffer_pool_size = 448M innodb_additional_mem_pool_size = 20M # Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 100M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 0 innodb_lock_wait_timeout = 50 -Original Message- From: matt_lists [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 5:56 PM To: matt_lists Cc: Anil Doppalapudi; [EMAIL PROTECTED] Subject: Re: Restore help! been going 2 weeks matt_lists wrote: > Can you post your my.ini or my.cnf > > sense your restore actually worked > > Mine is not swapping, in fact, mysql is only using 610,824 K of ram, > there is still over 1 gig of ram free > > > Our next server will have 16 gig of ram and quad xeons, I'm going to > completely disable the swap files > Any c
Monitoring replication in mysql
Hi, we have no of mysql replication setups in our setup. how to monitor those replication setups.my aim is if any slave goes down my script should immediately send an alert mail to me. if anybody having already developed scripts please let me know otherwise just give me an idea what to monitor in in replication setup. Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Restore help! been going 2 weeks
please check the my.cnf parameters with recommended values given in my_huge.cnf file in support files. to my knowledge For 2 GB RAM values you set are very high. I think system is going for heavy swapping that might be the reason it is going very slowly. Anil -Original Message- From: matt_lists [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 12:11 AM To: Anil Doppalapudi Cc: [EMAIL PROTECTED] Subject: Re: Restore help! been going 2 weeks Anil Doppalapudi wrote: >it is not normal. i have restored 90 GB database in 2 days on dell server >with 2 GB RAM. >Are you able to connect to mysql. if so at mysql prompt type the below >command and check what processes are running > >mysql>show processlist; > >if any insert statements are running then restoration process is going on >then check your my.cnf parameters. > > > This is a dell with 2 gig of ram set-variable= key_buffer_size=1500M set-variable=join_buffer_size=512M set-variable= max_allowed_packet=384M set-variable=delay_key_write=ALL set-variable= table_cache=512 set-variable= sort_buffer_size=256M set-variable= record_buffer=384M set-variable= thread_cache=8 set-variable=myisam_sort_buffer_size=384M myisam-recover=BACKUP,FORCE set-variable=read_buffer_size=384M set-variable=interactive_timeout=7200 set-variable=wait_timeout=7200 set-variable=thread_concurrency=4 mysql> show processlist; +++++-+--++- -+ | Id | User | Host | db | Command | Time | State | Info | +++++-+--++- -+ | 2 | xotech | localhost:1810 | finlog | Query | 75 | update | INSERT INTO `321st_stat` VALUES ('AE1','AF4','013000887','EA','1','W918AR42800179','R','04280','','B | | 6 | xotech | localhost:1634 | NULL | Query |0 | NULL | show processlist | +++++-+--++- -+ 2 rows in set (0.00 sec) mysql> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Restore help! been going 2 weeks
it is not normal. i have restored 90 GB database in 2 days on dell server with 2 GB RAM. Are you able to connect to mysql. if so at mysql prompt type the below command and check what processes are running mysql>show processlist; if any insert statements are running then restoration process is going on then check your my.cnf parameters. Anil -Original Message- From: matt_lists [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 6:15 PM To: [EMAIL PROTECTED] Subject: Re: Restore help! been going 2 weeks The restore is still running is this normal? How do you all deal with customers that do not have their data for almost 3 weeks, and no end in sight I've had oracle crashes before, the restores were very simple, this is not I am very disappointed with mysql's performance with files over 5 gig > Almost all my MYD files are more than 4 gig > > I was not aware of this limitation > > I tested with InnoDB and found it horribly slow for what we do > > Anil Doppalapudi wrote: > >> check your .myd file size. if table type is myisam and it it is more >> than 4 >> GB then convert it to InnoDB. >> >> --Anil >> >> >> > > -- 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: mysql_install_db problem!!
check the privileges on directories. that error you generally get when user dont have sufficient privileges on directories. please go through the installation steps given in mysql documentation Anil -Original Message- From: gerald_clark [mailto:[EMAIL PROTECTED] Sent: Thursday, December 16, 2004 8:28 PM To: manasvini nandakumar Cc: [EMAIL PROTECTED] Subject: Re: mysql_install_db problem!! manasvini nandakumar wrote: >Hi all, > >I have cross compiled mysql-4.1.7 (from the source distribution)for an IXP425 based board with Montavista Linux-3.0.When I run mysql_install_db --user=mysql ...It runs into several errors with the following log > >--- [EMAIL PROTECTED]: /usr/local# ./bin/mysql_install_db --user=mysql >WARNING: The host '192.168.10.231' could not be looked up with resolveip. >This probably means that your libc libraries are not 100 % compatible >with this binary MySQL version. The MySQL daemon, mysqld, should work >normally with the exception that host name resolving will not work. >This means that you should use IP addresses instead of hostnames >when specifying MySQL privileges ! >ERROR: 3 Error writing file './mysql/db.frm' (Errcode: 2) >ERROR: 1146 Table 'mysql.db' doesn't exist >ERROR: 1146 Table 'mysql.db' doesn't exist >ERROR: 3 Error writing file './mysql/host.frm' (Errcode: 2) >ERROR: 3 Error writing file './mysql/user.frm' (Errcode: 2) > >--- --- > >The filesystem is NFS mounted.I am hoping someone can tell me why this is happenning and If I have missed out something. > > The mysql user cannot write to the database directory. It could be an NFS issue. >Thanx in advance, > >Manasvini > > > > > > > > >- >Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > > -- 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: Are these variables "healthy"?
hi you can find mysql recommendations of my.cnf parameters based on on RAM size in /usr/local/mysql/support-files with file name my-huge.cnf go through those files and set parameters accordingly for most of databases it will work fine. Anil -Original Message- From: Fagyal Csongor [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 5:36 AM To: [EMAIL PROTECTED] Subject: Are these variables "healthy"? Hi, I am running an instance of MySQL 4.0.16, mostly using MyISAM tables on a 18G 10kRPM SCSI drive w/ ext3, the server having 2G RAM and a 2.8G HT P4, on a RedHat 9 install. Would some of you experts be so kind to take a look at the variables I have, and tell me if anything is wrong? I think the server is using a little too much I/O, but I am not sure... maybe I could tune something? my.cnf (only the relevant parts): skip-locking wait_timeout = 1800 interactive_timeout = 1800 max_connections=300 key_buffer=32M max_allowed_packet=1M table_cache=1024 sort_buffer=2M record_buffer=1M myisam_sort_buffer_size=4M thread_cache=4 log=/var/log/mysqld-query.log log-slow-queries=/var/log/mysqld-slow.log tmpdir=/tmp/ query_cache_limit=128k query_cache_size=16M query_cache_type=1 STATUS: Threads: 51 Questions: 967003 Slow queries: 2 Opens: 135 Flush tables: 1 Open tables: 125 Queries per second avg: 81.016 SHOW STATUS: +--+---+ | Variable_name| Value | +--+---+ | Aborted_clients | 1406 | | Aborted_connects | 1 | | Bytes_received | 7285 | | Bytes_sent | 319972773 | | Com_admin_commands | 668953| | Com_alter_table | 1 | | Com_analyze | 0 | | Com_backup_table | 0 | | Com_begin| 0 | | Com_change_db| 4675 | | Com_change_master| 0 | | Com_check| 0 | | Com_commit | 0 | | Com_create_db| 0 | | Com_create_function | 0 | | Com_create_index | 0 | | Com_create_table | 0 | | Com_delete | 211 | | Com_delete_multi | 0 | | Com_drop_db | 0 | | Com_drop_function| 0 | | Com_drop_index | 0 | | Com_drop_table | 0 | | Com_flush| 0 | | Com_grant| 0 | | Com_ha_close | 0 | | Com_ha_open | 0 | | Com_ha_read | 0 | | Com_insert | 17890 | | Com_insert_select| 0 | | Com_kill | 0 | | Com_load | 0 | | Com_load_master_data | 0 | | Com_load_master_table| 0 | | Com_lock_tables | 1 | | Com_optimize | 0 | | Com_purge| 0 | | Com_rename_table | 0 | | Com_repair | 0 | | Com_replace | 64| | Com_replace_select | 0 | | Com_reset| 0 | | Com_restore_table| 0 | | Com_revoke | 0 | | Com_rollback | 0 | | Com_savepoint| 0 | | Com_select | 162423| | Com_set_option | 0 | | Com_show_binlog_events | 0 | | Com_show_binlogs | 0 | | Com_show_create | 0 | | Com_show_databases | 28| | Com_show_fields | 3926 | | Com_show_grants | 0 | | Com_show_keys| 20| | Com_show_logs| 0 | | Com_show_master_status | 0 | | Com_show_new_master | 0 | | Com_show_open_tables | 0 | | Com_show_processlist | 0 | | Com_show_slave_hosts | 0 | | Com_show_slave_status| 0 | | Com_show_status | 4 | | Com_show_innodb_status | 0 | | Com_show_tables | 140 | | Com_show_variables | 0 | | Com_slave_start | 0 | | Com_slave_stop | 0 | | Com_truncate | 0 | | Com_unlock_tables| 0 | | Com_update | 31543 | | Connections | 14178 | | Created_tmp_disk_tables | 0 | | Created_tmp_tables | 8708 | | Created_tmp_files| 0 | | Delayed_insert_threads | 0 | | Delayed_writes | 0 | | Delayed_errors | 0 | | Flush_commands | 1 | | Handler_commit | 0 | | Handler_delete | 178 | | Handler_read_first | 37| | Handler_read_key | 25041603 | | Handler_read_next| 83330028 | | Handler_read_prev| 28| | Handle
creating mysqldump log file
Hi, Is there any way to create a log file for mysqldump just like oracle export log file i.e what tables exported no of rows exported like that Thanks in advance Anil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Deleting redundant rows
create a unique key on city,cc columns with ignore option of alter table it will keep the first row and deletes redundant rows. check the below link for alter table syntax http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html Anil -Original Message- From: Walter Pucko [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 PM To: [EMAIL PROTECTED] Subject: Deleting redundant rows Hello there, I do have a table in mysql 4.x with redundant info. Only the autoincrement ID is different. Example: ID citycc 2559756 Witkop SF 2559757 Witkop SF This turns to be a huge problem since I cant find a way to delete the redundant rows with a mysql query. Is there a solution for that? I tried it with distinct, but that does not work, with subselects but this seems not to be supported. I am lost here, maybe someone with better sql knowledge can help out. Thank you for any help, Merlin -- GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail +++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++ -- 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: Restore help! been going 2 weeks
check your .myd file size. if table type is myisam and it it is more than 4 GB then convert it to InnoDB. --Anil -Original Message- From: matt_lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 8:36 PM Cc: [EMAIL PROTECTED] Subject: Re: Restore help! been going 2 weeks Nobody else has problems with restores on 8+ gig tables? -- 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: Increasing the InnoDB log file size
if mysql shutdowns cleanly. then there is no chance of loosing data. for safe side take compleate database backup. -Original Message- From: Ronan Lucio [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 11:39 PM To: Anil Doppalapudi; [EMAIL PROTECTED] Subject: Re: Increasing the InnoDB log file size Anil, > First shutdown the mysql cleanly. > > #mysqladmin shutdown > > then drop log files in data directory. > > restart mysql. it will create new log files. Do you know if is there a risk of loosing any data? Thanks, Ronan -- 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: Increasing the InnoDB log file size
Hi, First shutdown the mysql cleanly. #mysqladmin shutdown then drop log files in data directory. restart mysql. it will create new log files. Thanks Anil NOC -Original Message- From: Ronan Lucio [mailto:[EMAIL PROTECTED] Sent: Friday, December 10, 2004 11:08 PM To: [EMAIL PROTECTED] Subject: Increasing the InnoDB log file size Hi, I need to increase the innodeb_log_file_size parameter, but when I set it higher, mysql don´t starts and give the follow erro: 041210 13:27:40 mysqld started InnoDB: Error: log file ./ib_logfile0 is of different size 0 100663296 bytes InnoDB: than specified in the .cnf file 0 134217728 bytes! 041210 13:27:40 [ERROR] Can't init databases 041210 13:27:40 [ERROR] Aborting 041210 13:27:40 [Note] /usr/local/libexec/mysqld: Shutdown complete 041210 13:27:40 mysqld ended Does anybody knows how can I do it? Thanks, Ronan -- 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]
How to rebuild indexes in InnoDB
Hi, any one give me an idea how to rebuild indexes in InnDB database. database users are complaining that response time is slow. right now what I am doing is dropping indexes on table and recreating them. After that Database is working fine for some days and again it is giving problem. dropping and recreating indexes taking lot of time. any alternative Thanks in advance. Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: max allowed packet error
follow these steps 1) first shutdown the database mysqladmin shutdown 2) Start the mysqldeamon bin/safe_mysqld --max_allowd_packet=16M --user=mysql & 3) to check what max allowd_packet it is using mysqladmin variables in the out-put check the value of variable max_allowed_packet Anil DBA -Original Message- From: Philippe Poelvoorde [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 8:13 PM To: Ferino Mardo; [EMAIL PROTECTED] Subject: Re: max allowed packet error HI, > I have copied the mysql-medium.cnf to /etc/my.cnf and have noticed that > the "max-allowed-packet" is 1M. no matter what I set it to 8M, 10M, 16M > I still get the error. did you try this in your my.cnf in the [mysqld] section ? set-variable= max_allowed_packet=8M -- Philippe Poelvoorde COS Trading Ltd. -- 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]
my.cnf parameter settings for 4 GB RAM
please provide me listof my.cnf parameter values for 4 GB RAM . from support files i can list out only upto 2 GB RAM my database is mysql 4.0.20 binary installation on linux and along with database apache, tomcat and one more application is running on the server. Thanks in advance Anil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Incremental backups in Mysql
Is it possible to take incremental backups in mysql.if yes please provide me links or info on it Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqldump very slow
Hi Stefan, Sorry for not giving complete details it a very small database around 12 Gb data. But on my other servers which are low in configuration i am getting dump very fast for me it is taking nearly 5 Hrs to compleate dump Thanks Anil DBA -Original Message- From: Stefan Kuhn [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 8:13 PM To: [EMAIL PROTECTED] Subject: Re: Mysqldump very slow You won't get any reasonable answers like this. How big is your db? How long does mysqldump actually take? If you tell this, people can tell you if this is like expected or too slow. Good answers depend on good questions. But a hint: You can't expect mysqldump to run in fractions of seconds. Depending on database size, it is quite normal for it to take some minutes. Stefan Am Thursday 28 October 2004 13:48 schrieb Anil Doppalapudi: > mysqldump running very slow. what might be the reason > > Server details > === > > Dell > RAM : 4 GB > Innodb_buffer_pool_size : 1000MB > > i am using --quick option in mysqldump > > Thanks > Anil > DBA -- Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Zülpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key is available at http://pgp.mit.edu -- 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]
Mysqldump very slow
mysqldump running very slow. what might be the reason Server details === Dell RAM : 4 GB Innodb_buffer_pool_size : 1000MB i am using --quick option in mysqldump Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySql Configuraton on Redhat
use the command below mysqladmin -u root -p supply the passwd when prompted Anil DBA -Original Message- From: Kamal Ahmed [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 8:35 PM To: Kamal Ahmed; [EMAIL PROTECTED] Subject: MySql Configuraton on Redhat Hi, This is the only place where I can ask these questions, and would greatly appreciate if anyone can give me some clue on how to resolve these issues. I have MySql running on Redhat 9, and I am trying to create a New Database. When I issue the command: mysqladmin -u root ver Result: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)' Command: [EMAIL PROTECTED] home]# mysqladmin -u root flush-privileges password "abcdef" Result: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)' Q1. How can I change the password for root ? Q2. How do I know if root IS the admin for MySql ? Q3. How can I add a Database ? Q4. How can I add a New User to a New Database ? Thanks in Advance, -Kamal. -- 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: Table creation Time stamp
i see the time stamp only for Myisam table type and not for InnoDB table type. where can we find for Innodb Table type Thanks Anil DBA -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 8:18 PM To: Anil Doppalapudi Cc: [EMAIL PROTECTED] Subject: Re: Table creation Time stamp use the command: SHOW TABLE STATUS http://dev.mysql.com/doc/mysql/en/SHOW_TABLE_STATUS.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine "Anil Doppalapudi" <[EMAIL PROTECTED]> wrote on 10/13/2004 10:42:11 AM: > Hi, > > > where can we find the time stamp of table creation i.e when that table was > created > > > Thanks > Anil > DBA > > > -- > 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]
Table creation Time stamp
Hi, where can we find the time stamp of table creation i.e when that table was created Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to flush process which are in sleep state
Hi, when i issue show processlist command it gives very long list of process most of them are sleep state . is there a way to clear those processs with out killing them Thanks in advace ANil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Read-Only DB User
First connect to mysql as root user and issue the following command grant select on .* to @ identified by ''; flush privileges; it will grant only select privilege to the newly created user on database and he can only connect from the ipaddress specified in command Anil DBA -Original Message- From: Lee Zelyck [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 7:30 AM To: [EMAIL PROTECTED] Subject: Read-Only DB User Hi All, I'm sorry to access such a basic question, but I couldn't find a specific answer to it in the mysql manual pages. The question is, how would someone create a basic read-only user for a single db? I just intend for it to be used by a script to validate data in the db itself. Anyway, if anyone can provide a lean and concise statement that will provide this, it would be very much appreciated. Thanks! Lee __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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: Create Table Error 1071
There might be limitation on length of index in mysql try this CREATE TABLE `adminpages` ( `adminpageid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `file_name` VARCHAR( 250 ) NOT NULL , `page_title` VARCHAR( 250 ) NOT NULL , PRIMARY KEY ( `adminpageid` ) , INDEX ( `file_name` , `page_title` ) ) COMMENT = 'Listing of all pages the administration module' just change the data length of columns from 255 to 250 for both the columns. I tried it on my local server. is is ok Anil DBA -Original Message- From: GH [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 12:16 AM To: [EMAIL PROTECTED] Subject: Create Table Error 1071 How can I fix the following error? I got this via phpMyAdmin Error SQL-query : CREATE TABLE `adminpages` ( `adminpageid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , `file_name` VARCHAR( 255 ) NOT NULL , `page_title` VARCHAR( 255 ) NOT NULL , PRIMARY KEY ( `adminpageid` ) , INDEX ( `file_name` , `page_title` ) ) COMMENT = 'Listing of all pages the administration module' MySQL said: #1071 - Specified key was too long. Max key length is 500 -- 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: How to extract Particular Tables from a Dump file taken with mysqldump
The actual problem is we maintain regular all-databases mysqldump.it is a automated script and after taking complete backup we purged data later we identified that some required data is missed in a particular table. so we require restore of only that particular table. we tried extracting only that particular table data using so awk and other stuff but it is taking very long time that table contain 120 million records. we want to know is there any mysql utility to extract only specified table from entire dump Thanks -Original Message- From: V. M. Brasseur [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 11:41 PM To: Buchibabu Cc: [EMAIL PROTECTED] Subject: Re: How to extract Particular Tables from a Dump file taken with mysqldump Why don't you use the mysqldump program to dump only those tables you want and not the entire database? http://dev.mysql.com/doc/mysql/en/mysqldump.html Cheers, --V Buchibabu wrote: > Hi, > > Please let me know how to extract few tables from a dump file, which is taken with mysqldump. I know it extracting a file. But the thing is I would like to do it with mysql. > > Thanks, > Buchibabu -- 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]
Reg : eliminating duplicate entries
Try this Take dump of table using mysqldump utility eg : mysqldump --quick --allow-keywords --no-create-info > Then truncate table data eg: mysql>truncate table ; create primary or unique keys what ever you want on table Then restore the data from dump file with the following options mysql --force < Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Restoring few tables from all-databases dump file
Hi, Regularly we maintain backup of all databases using mysqldump utility. Most of the times i am getting requests from our QA department to restore a particular table or particular database to check purging scripts and other scripts. Is there any way to restore a particular table or databases from all-databases backup Thanks Anil DBA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql installation problem
Hi, I am trying to install myql on redhat. mysql package used: mysql-3.23.52-unknown-freebsdelf4.6-i386.tar.gz While following the instructions in install document..when i run the follwing command.. scripts/mysql_install_db following errors appear: - scripts/mysql_install_db: ./bin/my_print_defaults: /usr/libexec/ld-elf.so.1: bad ELF interpreter: No such file or directory WARNING: The host 'njsupport.niksun.com' could not be looked up with resolveip. This probably means that your libc libraries are not 100 % compatible with this binary MySQL version. The MySQL deamon, mysqld, should work normally with the exception that host name resolving will not work. This means that you should use IP addresses instead of hostnames when specifying MySQL privileges ! Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables scripts/mysql_install_db: ./bin/mysqld: /usr/libexec/ld-elf.so.1: bad ELF interpreter: No such file or directory Installation of grant tables failed! Examine the logs in ./data for more information. You can also try to start the mysqld daemon with: ./bin/mysqld --skip-grant & You can use the command line tool ./bin/mysql to connect to the mysql database and look at the grant tables: shell> ./bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in ./data that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the ./bin/mysqlbug script! -- As i am new bie to mysql ..please tell how can i make mysql work. Thanks and Regards Anil. p.s.(Can i get precomplied package (.tgz) to which i can directly pkg_add?). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: oracle.
thanks, that helped anil :) -Original Message- From: Nestor Florez [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 12:51 PM To: Anil Garg Subject: Re: oracle. Anil, I do not remember correct but you need to look at the user_tables. 'desc user_tables' One of the fields mught be owner or something then you can do "select * from user_tables where owner='SCOTT';" Now, I am not 100% sure on htat command but you need to key on somethin gin the user_tables :-) ---Original Message--- From: Anil Garg <[EMAIL PROTECTED]> Sent: 03/17/03 09:34 AM To: [EMAIL PROTECTED] Subject: oracle. > > hi, m a frequent user of mysql. i was trying to use "show tables" on oracle(sql>), but it dint work :( How do list tables in oracle? Thanks anil. p.s. sorry for the out of list question. - Before posting, please check: http://www.mysql.com/manual.php";>http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/";>http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php";>http://lists.mysql.com/php /unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
oracle.
hi, m a frequent user of mysql. i was trying to use "show tables" on oracle(sql>), but it dint work :( How do list tables in oracle? Thanks anil. p.s. sorry for the out of list question. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: date query.
Thanks..that helped. anil :) -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:52 AM To: [EMAIL PROTECTED] Cc: Anil Garg Subject: Re: date query. * Anil Garg > The date field in my database table looks as below: > 07th of March 2003 10:14:29 PM Then it is probably not a 'date field' in the sense that it is of type "date", "datetime" or "timestamp". > I need to write a query which gets me all the rows which are > entered in last to weeks. > > Any ideas!! Convert the existing column to a real date field, and use the powerfull builtin date & time functions of mysql: SELECT * FROM table WHERE datecol > NOW() - INTERVAL 14 DAY; http://www.mysql.com/doc/en/Date_and_time_types.html > http://www.mysql.com/doc/en/DATETIME.html > http://www.mysql.com/doc/en/Date_and_time_functions.html > -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
date query.
Hi, The date field in my database table looks as below: 07th of March 2003 10:14:29 PM I need to write a query which gets me all the rows which are entered in last to weeks. Any ideas!! Thanks and Regards Anil. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: command line exectution of query(newbie)
thanks, that helped :) -Original Message- From: Jennifer Goodie [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 1:49 PM To: Anil Garg; [EMAIL PROTECTED] Subject: RE: command line exectution of query(newbie) Database name goes after options. It is showing you the help page because it does not understand what you are passing to it. It's kind of saying "Here, look at this, this is how I work, follow these directions they might help you out." -Original Message- From: Anil Garg [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 10:26 AM To: [EMAIL PROTECTED] Subject: command line exectution of query(newbie) Hi, What am i doing wrong: # ./mysql -e "delete * from where id > 5;" I get the mysql help page on exectuting the above command. The mysql verison i am using is : 3.23.52. Thanks and regards anil. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: command line exectution of query(newbie)
Sorry, # ./mysql -e "delete from where id > 5;" The above command too doesn't work, it shows the mysql man page.:( any more ideas? thanks and regards anil. -Original Message- From: Jocelyn Fournier [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 2:38 PM To: Anil Garg; [EMAIL PROTECTED] Subject: Re: command line exectution of query(newbie) Hi, The right DELETE syntax is : delete from where id > 5; Regards, Jocelyn - Original Message - From: "Anil Garg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 6:26 PM Subject: command line exectution of query(newbie) > Hi, > > What am i doing wrong: > > # ./mysql -e "delete * from where id > 5;" > > I get the mysql help page on exectuting the above command. > > The mysql verison i am using is : 3.23.52. > > Thanks and regards > anil. > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
command line exectution of query(newbie)
Hi, What am i doing wrong: # ./mysql -e "delete * from where id > 5;" I get the mysql help page on exectuting the above command. The mysql verison i am using is : 3.23.52. Thanks and regards anil. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqldump
Hi, I need to dump a database table in tab seperated or comma seperated format and then want to delete the entries in that table.(And then mail the dump to someone.) Can i get some pointers about this. (I was not able to use -T option in mysqldump, i am trying "./mysqldump -T awf_four false_info > test" , where awf_four is database name and false_info is a table). I want to do it from command prompt as i want to make a shell script which does all this.(and then put and entry for this script in crontab). help!! Thanks and Regards Anil p.s. please tell if more info is needed from me. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: database query.
hi, I appreciate the time you spared for my problem. Thanks, that helped :) Regards Anil -Original Message- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:47 PM To: Anil Garg Subject: Re: database query. There really isn't enough information for me to answer without making some assumptions. So, I'll make those assumptions: 1) For all input rows with a given value of Tndr, you want to produce an output row of the form [lowest value] followed by a hyphen followed by [highest value] if more than one such input row exists 2) For all input rows with a *unique* value of Tndr, you want to produce an output row equal to the input row 3) In 1), 'lowest' and 'highest' can be done with the sql max() and min() functions -- this contradicts your example below, because you seem to be doing numeric comparisons relying on the meaning of alphanumeric text. If your example is right, that makes things *much* harder. 4) You'll settle for having only output lines in the form of 1). If so, the following SQL would work with most DBMSs; I'm not sure about MySQL in particular: select varchar(Tndr) + ' > ' + varchar(min(Detail)) + ' - ' + varchar(max(Detail)) from thetable group by Tndr; If you really want both formats 1) and 2), try: select varchar(Tndr) + ' > ' + varchar(min(Detail)) + ' - ' + varchar(max(Detail)) from thetable group by Tndr having count(*) > 1 union select varchar(Tndr) + ' > ' + varchar(min(Detail)) from thetable group by Tndr having count(*) = 1; Bruce Feist Anil Garg wrote: >Hi, > >I have a table as shown with approx 500 lines: > >--- >Tndr | Detail| > >34 | one | >47 | two | >34 | three | >55 | four | >47 | five | > > >There can be multiple 'tndr' fields with same values. > >I need to do something so that i can get the output as following: > >34 > one - three >47 > two - five >55 > four > >Is there a direct query to do that OR any ideas on what lines shall i think >to modify my database(if needed). > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
database query.
Hi, I have a table as shown with approx 500 lines: --- Tndr| Detail| 34 | one | 47 | two | 34 | three | 55 | four | 47 | five | There can be multiple 'tndr' fields with same values. I need to do something so that i can get the output as following: 34 > one - three 47 > two - five 55 > four Is there a direct query to do that OR any ideas on what lines shall i think to modify my database(if needed). Thanks and Regards Anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
users who can access a database
hi, Is there some place where i can define the users who can access the database. If yes..plz help thanx and regards anil sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
cant connect to mysql
hi i am facing a very strange problem.. when i say "apachectl restart" my web site works fine.. but, when i say #apachectl stop #apachectl start the web user is not able to connect to the mysql database. Now, when i reboot the machine, the things become fine agian. I would reaaly appreciate any pointers regarding this. thanx and regards anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
which version to use?
hi What version combinations of mysql and php should be used? regards anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Supplied argument is not a valid MySQL result resource!!
can u plz tell me how can i check that? regards anil - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]> Cc: "SteveH" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 15, 2002 5:41 PM Subject: Re: Supplied argument is not a valid MySQL result resource!! > In the last episode (Aug 15), Anil Garg said: > > > Thursday, August 15, 2002, 1:12:21 PM, you wrote: > > > > > > > Hi, > > > > in the piece of code given below > > > > --- > > > > $qid = mysql_query(" > > > > SELECT * > > > > FROM 1_nodedata > > > > WHERE id = $edit_id > > > > "); > > > > $frm = mysql_fetch_array($qid); > > > > > hi, > > m sorry i dint mention that its just a part of code. > > i am able to delete entries from the database .so i think mysql_connect is > > not the reason. > > please tell if u have some more ideas > > You don't check the return value of mysql_query to make sure that it > succeeded. > > -- > Dan Nelson > [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Supplied argument is not a valid MySQL result resource!!
yes..it echos $edit_id fine. i am also feeling strange why its not working! regards anil - Original Message - From: "Jocelyn Fournier" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 15, 2002 5:40 PM Subject: Re: Supplied argument is not a valid MySQL result resource!! > Hi, > > try : > > > $qid = mysql_query(" > > SELECT * > > FROM 1_nodedata > > WHERE id = '$edit_id' > > "); > > $frm = mysql_fetch_array($qid); > > (what does echo "edit_id : $edit_id"; display ?) > > Regards, > Jocelyn > - Original Message - > From: "Anil Garg" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 15, 2002 11:12 PM > Subject: Supplied argument is not a valid MySQL result resource!! > > > > Hi, > > in the piece of code given below > > --- > > $qid = mysql_query(" > > SELECT * > > FROM 1_nodedata > > WHERE id = $edit_id > > "); > > $frm = mysql_fetch_array($qid); > > --- > > i get the follownig error: > > > > Warning: Supplied argument is not a valid MySQL result resource in > > /z/mercury/www/niksun/admin/add_doc.php on line 107 > > element type: > > > > What is it happening so!! > > regards > > anil > > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Supplied argument is not a valid MySQL result resource!!
hi, m sorry i dint mention that its just a part of code. i am able to delete entries from the database .so i think mysql_connect is not the reason. please tell if u have some more ideas regards anil - Original Message - From: "SteveH" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 15, 2002 4:50 PM Subject: Re: Supplied argument is not a valid MySQL result resource!! > Anil, > > You never created a connection. > mysql_connect() > > > Regards. > > > > > > Thursday, August 15, 2002, 1:12:21 PM, you wrote: > > > Hi, > > in the piece of code given below > > --- > > $qid = mysql_query(" > > SELECT * > > FROM 1_nodedata > > WHERE id = $edit_id > > "); > > $frm = mysql_fetch_array($qid); > > --- > > i get the follownig error: > > > Warning: Supplied argument is not a valid MySQL result resource in > > /z/mercury/www/niksun/admin/add_doc.php on line 107 > > element type: > > > What is it happening so!! > > regards > > anil > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Supplied argument is not a valid MySQL result resource!!
Hi, in the piece of code given below --- $qid = mysql_query(" SELECT * FROM 1_nodedata WHERE id = $edit_id "); $frm = mysql_fetch_array($qid); --- i get the follownig error: Warning: Supplied argument is not a valid MySQL result resource in /z/mercury/www/niksun/admin/add_doc.php on line 107 element type: What is it happening so!! regards anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Lost root password
c if this helps: 1.. Cold Reboot the machine and hit the SPACE bar to stop loading when this message appears: Hit[ENTER] to boot immediately or any other key for cmd prompt. Booting kernel in 9,8,7? 2.. Type: boot -s (machine now in single user mode.) You will see the following message: Enter full pathname of shell or RETURN for /bin/sh: 3.. JUST HIT ENTER AND CONTINUE 4.. Type: mount -u / 5.. Type: mount /usr 6.. Type: passwd 7.. New Password: 8.. Retype Password: 9.. Type: Reboot regards anil - Original Message - From: "michael johnson" <[EMAIL PROTECTED]> To: "Support at Mysql" <[EMAIL PROTECTED]>; "mysql@lists. mysql. com" <[EMAIL PROTECTED]> Sent: Monday, July 22, 2002 6:32 AM Subject: Lost root password > > > > > We have a support contract with you. One of my clients has lost his root > password. How can we access his mysql? > > Michael Johnson > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql upgrade
hi, I cant use some characters in my full text search (like * , "" , etc.) I found out that it was due to the old version of the mysql i am using. Now the problem is i want to switch from the older version(3.23.49) to 4.0.2 so that my full text search can be more efficient. Can some one tell me what needs to be done for the upgarde?and What backups do i need to take? thanx and regards, anil. mysql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql upgrade
hi, I cant use some characters in my full text search (like * , "" , etc.) I found out that it was due to the old version of the mysql i am using. Now the problem is i want to switch from the older version(3.23.49) to 4.0.2 so that my full text search can be more efficient. Can some one tell me what needs to be done for the upgarde?and What backups do i need to take? thanx and regards anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: UPDATE command..
update set id = replace(id, '1', '2'); hope this helps anil - Original Message - From: "Patrick J Okui" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 9:47 AM Subject: UPDATE command.. > > > I have two collumns in my mysql database like this > > +--++ > |id|domain | > +--++ > |user@domain1com |domain1.com | > |[EMAIL PROTECTED] |domain1.com | > |[EMAIL PROTECTED] |domain1.com | > +--++ > > in a table users. > > How do I construct an sql update statement like > update users set id =. where domain = "domain1.com" > > so that the id column becomes > +--+ > |id| > +--+ > |[EMAIL PROTECTED] | > |[EMAIL PROTECTED] | > |[EMAIL PROTECTED] | > +--+ > > thanks. > > Patrick J Okui > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
' giving problem while inserting in table.
Hi, I am making a faq maintenance system using mysql and php. To insert a entry in to a faq table i am using the following query: - INSERT INTO faq_table_netvd (id,question, answer,netvcr,netdetector,add_date,mod_date,keyword,category,display,attach_ id) VALUES ('0','$frm[question]', '$frm[answer]','$frm[netvcr]','$frm[netdetector]','$frm[add_date]','$frm[mod _date]','$frm[keyword]','$frm[category]','$frm[display]','$frm[attach_id]') "); --- now the problem is when $frm[question] has some string like: "why i can't eat". i get the following error: MySQL Error: You have an error in your SQL syntax near 't eat?' ,answer = 'Please recheck the power of your specs:)' ' at line 3.Putting a '\' before ' (e.g. \')solves my problem...but when i open the same quesion to edit it, again i have to put backslashes where ever i find " ' " in the quesion or answer. Can anyone please suggest a solution to this. thanx and regards anil [please ask if i havent explained the problem fully] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
replace query
Hi, i have a table with 2000 rows. One column (name answer)has a string ("ok --") in all the rows.(e.g "ok -- yes we support this."). now i want to remove all these 'ok --' in this column..leaving(e.g yes we support this) I tried to do it with the replace query but being a newbie to mysql i couldnt find the right syntax. Can someone help. thanx and regards anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: changing coulmn
thanx for ur mail, m sorry in dint mention that infact its a big table... Is there a way i can do it in all the columns using only one query ?? thanx anil - Original Message - From: "nellA hciR" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 02, 2002 2:14 PM Subject: Re: changing coulmn > mysql> create table mytest ( > -> my_1 varchar(5) > -> ); > Query OK, 0 rows affected (0.32 sec) > > mysql> alter table mytest change my_1 my_file_1 varchar(5); > Query OK, 0 rows affected (0.23 sec) > Records: 0 Duplicates: 0 Warnings: 0 > > mysql> show columns from mytest; > +---++--+-+-+---+ > | Field | Type | Null | Key | Default | Extra | > +---++--+-+-+---+ > | my_file_1 | varchar(5) | YES | | NULL| | > +---++--+-+-+---+ > > On Tuesday, July 2, 2002, at 09:36 , Anil Garg wrote: > > > in my table a column has enties > > my_1 > > my_4 > > my_5 > > > > i wnat to change it to > > my_file_1 > > my_file_4 > > my_file_5 > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
changing coulmn
in my table a column has enties my_1 my_4 my_5 i wnat to change it to my_file_1 my_file_4 my_file_5 can someone please tell me the query for that. thanx anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Lost Connection to mysql server during query
Hi, Thanx for your mail You are rightin my case the mysqld is getting restarted. But, whey is mysqld getting restarted and giving the Lost Connection error. How can i avoid that?? Thanx anil - Original Message - From: "Dicky Wahyu Purnomo" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]> Sent: Saturday, June 29, 2002 9:04 AM Subject: Re: Lost Connection to mysql server during query > Pada Thu, 27 Jun 2002 10:59:48 -0400 > "Anil Garg" <[EMAIL PROTECTED]> menulis : > > > Now when i try to insert by using the following query: > > > > INSERT INTO 1_polls VALUES (1,'This web site is...',1,1,7,20011223105127); > > > > It gives the error: > > Error 2013 at line 235: Lost connection to MySQL server during query > > > > If i decrease the lenght of time stamp in the INSERT query > > > > INSERT INTO 1_polls VALUES (1,'This web site is...',1,1,7,2001122); > > > > it works fine. > > > > Can anyone help me by telling wots going wrong here!! > > Have you retry the first query again ? > > Usually, Lost Connection happens because your query process has been killed by someone else (or even the system - maybe something related to query timeout values) or the mysqld was restarted. > > -- > People disagree with me. I just ignore them. > -- Linus Torvalds, regarding the use of C++ for the Linux kernel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Lost Connection to mysql server during query
Hi, Here is a strange problem!! I created a table by the following qurey: CREATE TABLE 1_polls ( id int(11) unsigned NOT NULL auto_increment, question varchar(128) NOT NULL default '', active tinyint(1) unsigned NOT NULL default '1', sortorder int(11) NOT NULL default '0', module_id int(11) NOT NULL default '0', last_access timestamp(14) NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; Now when i try to insert by using the following query: INSERT INTO 1_polls VALUES (1,'This web site is...',1,1,7,20011223105127); It gives the error: Error 2013 at line 235: Lost connection to MySQL server during query If i decrease the lenght of time stamp in the INSERT query INSERT INTO 1_polls VALUES (1,'This web site is...',1,1,7,2001122); it works fine. Can anyone help me by telling wots going wrong here!! thanx anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
query: restartmysql daemon
Hi, the sql process(on doing ps) shows the following process: /usr/local/bin/safe_mysqld --user=mysql when i kill this process and try to restart it with command: safe_mysqld --user=mysql it says "a mysql process already exists". can anyone tell me how to restart mysql daemon. thanx anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
long table scroll down
Hi, for viewing long tables. in my sql query when i say SELECT * FROM abc i miss the upper entries of the table as they scroll down. is there something by which i can view a table page by page(as | more in unix) thanx anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: not able to edit table:((
The persmissions seems to be ok. ne other ideas!! - Original Message - From: "Kiss Dániel" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 12:59 PM Subject: Re: not able to edit table:(( > Greetings, > > Stop the MySQL server and check the table files. > I think they are read only if you use Win32, or under Linux the user > 'mysql' does not have the write right to the tables or its directories > > In the last case: > chmod 660 * > and/or > chown mysql:mysql * > > At 12:39 2002.06.11. -0400, you wrote: > >Hi, > >I am not able to edit a table: > >the sql queries i tried are follows: > > > > >delete form documents where id = 134;gives the following error: > >error: table documents is read only > > > >repair doesnt seem to work > >repair table documents; > >Table Op Mst_typeMsg_text > >mydb.documentsrepair error"the 'documents' is read only > > > >Can someone help me > >thanx > >anil > > > > > > > >- > >Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > >To request this thread, e-mail <[EMAIL PROTECTED]> > >To unsubscribe, e-mail <[EMAIL PROTECTED]> > >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
not able to edit table:((
Hi, I am not able to edit a table: the sql queries i tried are follows: >delete form documents where id = 134;gives the following error: error: table documents is read only repair doesnt seem to work repair table documents; Table Op Mst_typeMsg_text mydb.documentsrepair error"the 'documents' is read only Can someone help me thanx anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help with empty set
- Original Message - From: "Chris Hohimer" <[EMAIL PROTECTED]> To: "Anil Garg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 2:26 PM Subject: Re: help with empty set > yeah that kinda works... > > what i have is > > $result = mysql($database "select x, y, z from $table where a and b and > c;", $link); > if ($result == empty set){ I think it shoudl work if u replace the above line with if ($result){ Plz write back the results > $z = NULL; > } > else > $x = mysql_result($result, 0, "x"); > $y= mysql_result($result, 0, "y"); > $z = mysql_result($result, 0, "z"); > } > > i have 1 row in my table. this row contains legit values for a, b, and c > so > when i set $result to NULL or 0 or whatever it goes into the ELSE > statement > but when select returns "Empty Set (0.02 sec)" it gives me this: > > Warning: Unable to jump to row 0 on MySQL result index# in > Location-of-file.php > > On Wednesday, June 5, 2002, at 12:20 PM, Anil Garg wrote: > > > have u tried with \0 ?? > > - Original Message - > > From: "Chris Hohimer" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, June 05, 2002 1:54 PM > > Subject: help with empty set > > > > > >> using PHP what is the value for a returned result from MySQL of "empty > >> set" > >> ex: > >> > >> if($result != NULL){ > >> do this > >> } > >> else{ > >> do that > >> } > >> > >> but NULL is not right. what should I replace NULL with? > >> > >> > >> > >> - > >> Before posting, please check: > >>http://www.mysql.com/manual.php (the manual) > >>http://lists.mysql.com/ (the list archive) > >> > >> To request this thread, e-mail <[EMAIL PROTECTED]> > >> To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > >> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > >> > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help with empty set
have u tried with \0 ?? - Original Message - From: "Chris Hohimer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 1:54 PM Subject: help with empty set > using PHP what is the value for a returned result from MySQL of "empty > set" > ex: > > if($result != NULL){ > do this > } > else{ > do that > } > > but NULL is not right. what should I replace NULL with? > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
changing column name
Hi Can anyone plz give me the query for chaning the column name of an existing table(which does not affect the elements of that column). I hope there is a way to do that. Any help appreciated Thanx Anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
errno: 145
hi when i try to read a table using query > select * from it shows following error: cant open file:'anil.MYD'.(errno: 145) y such an error can come!! earlier it was fine. thanx for help anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: STRING TO NUMBER
i think u dont need to it will automatically deal with it. - Original Message - From: "Marcel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 16, 2002 3:26 PM Subject: STRING TO NUMBER > Hi, > In Oracle i use TO_NUMBER to convert a String to a Number what Function Do i > have to use in Mysql ?? > > thank´s > > Marcel. > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL, PHP, Apache: /usr/libexec/ld.so: httpd: libmysqlclient.so.6.0: No such file or directory
Thalis A. Kalfigopoulos <[EMAIL PROTECTED]> wrote: > > Since you updated both mysql and php you presumably > should recompile apache as well. A quick&dirty solution > though could be to just create a link: libmysqlclient.so.6.0-> > libmysqlclient.so.10.0 and see what happens from there :-) Nope, that's not true. You never need to recompile Apache if you are using PHP as a DSO (which we do in the OpenBSD ports tree). And don't symlink the shared library! Recompile to make it link against the right one. This is purely a mismatch of binary ports, I think. Update your ports tree and reinstall the ports from source, and everything will work fine. -- Anil Madhavapeddy, <[EMAIL PROTECTED]> - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
A newbie question
hello All, I am new to mysql database. I downloaded mysql and running on my system. For adminiatrative purpose the command i run as written in manual is "mysql -u root mysql" I am unable to understand why i have to write mysql after "-u root" why not any other database name "test". I tried to run the command like this "mysql -u root test" and when i tried to add a user i ghot Error Table db.user does not exist. I am unable to understand the meaning of above Error. Please help me to understand the problem. Thanks in advance anil - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
error in .frm file
OS is Linux latest version web server apache servlets apache jserv databse server MySql problem : when machine starts and all server starts any databse having more than 6 tables creates problem problem is column cln1, cln2 not found in aa.frm table when i shut down and start mysql server it runs properly pls help _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php