How Do You Cancel Out Of A Long Running Query W/out Exiting Mysql?
How does one cancel out of a long-running query that has been entered at the command line w/out exiting completely out of the mysql interface?
View Complete Forum Thread with Replies
Related Forum Messages:
Cancel A Running Query
Does anyone know if there is a way to cancel a query once it has started executing? I've thought of killing the process through "show processlist". Is there a better way (since I'm calling SQL from a Java application)?
View Replies !
Process Running Long
2874 mysql 24 0 143m 132m 3756 S 0.0 6.5 1296:37 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid- 6 root RT 0 0 0 0 S 1.2 0.0 47:31.78 [migration/2] 3188 mysql 16 0 143m 132m 3756 S 0.0 6.5 9:55.19 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid- Is there any way I can prevent this? This server just has forums on it and thats it. It seems its a runaway process or an orphaned connection. Is there any way to have all processes killed after a certian amount of time like php has in its config file.
View Replies !
MYSQL Running Query On Data Through Php...
I am trying to take address info from 5 different fields in mysql, concatenate them into one string of text and have then run through a POST, like you would in a form, and have them spit out on the other end into the database the Lat and Lon of the address... I can do it manually, but I would like to do it automatically... I would like to know if I am going at this right... Psuedo QUERY=SELECT addressNumber, addressStreet, city, state, zip FROM table $addressStr=addressNumber + " " + addressStreet + ", " + city + ", " + state RUN IT THROUGH A POST SOMEHOW??? and call GEOCODER from my manual insert script... $sql=INSERT INTO table SET lat='$lat', lon='$lon'
View Replies !
Long Query
Heres my query that will not show up the correct data SELECT * FROM `table` WHERE (`field1`="data1" AND `field2`="data2") AND (`field3` LIKE '%abc%' OR `field4` LIKE '%abc%') It seems not to factor in the first two field's correctly.
View Replies !
When Is A Query Too Long?
I'm just curious to other opinions on the whether you should start to break the sql query in question up, into 2 queries maybe? I have the problem at the moment where I am pulling data from 5 different tables, subqueries and all! I am just not entirely happy with the size of the query and wanted to hear other opinions, Do you try to simplify the query by breaking it up? All tables are normailised (to the best of my ability) and index accrodingly so all that is ok, I am just curious to hear anybody else's thoughts on this.
View Replies !
Take Long Time To Run A Query!
I have a webserver that I just use for a webapplication. PHP, Apache and MySQL is installed on the server. The size of MySQL database is 10 GB. End inn it is millions of rows. I wonder where I search what is the normail time the data to return? In my case it takes from 20 sec to 2 min to run a query!
View Replies !
Table Query Taking WAY TO LONG
I have a query that is inner joined with another table based on country codes Select distinct Name.* from Name inner join Location on Location.key = Name.key and Location.cc in ('<list of countries here>'); The problem is when I have more than 2 country codes, the query takes forever... When I show processlist, it says converting HEAP to MyISAM ( this takes over an hour )... I've tried bumping up max_heap_table_size to 128M and tmp_table_size to 128M, but that only seems to delay the converting HEAP to MyISAM message.... Name contains about 3 million records and Location contains about 1.5 million records. Code:
View Replies !
Query Takes A Long Time
On my site I have a query that searches through 1,7 million. The php-file with the query takes a bit of time to load. Is it possible to show some sort of progress-bar during this time?
View Replies !
Error Pasting Long Query Into Terminal
mysql database < /location/of/statement.txt Is there a limit to the number of lines a statement can have in a terminal window? OK, so I just tried the same query on another server and it works in that terminal window? Is there a clip board or cache that needs to be cleared from mysql every once in a while? Why would it work on one and not on another.
View Replies !
Running A Query
I'm following a guide, and it says to do this stuff in my mysql database. However, whenever I try to run it (with slight alterations to the code to try to get it to work) it always gives me a syntax error. What do I have to type exactly? Hers the code: mysql> CREATE TABLE chat -> chtime DATATIME, -> nick CHAR (10) NOT NULL, -> words CHAR (150);
View Replies !
Connection Error While Running A Query
I recently started to experiment a connection timeout when querying a table returning 350 rows. The query runs for less than 1.5 seconds. The results are no more than 500K. Usually, the first time the query runs, no errors are returned. However, if I run it a couple times in a row, the second time around, the MySQL server goes offline for less than a minute giving the "no connection" error.
View Replies !
Switch Query Logging While The Server Is Running
It would be nice if general query logging could be switched on and off while the MySQL server is running, and not only at startup time. While debugging an application that uses foreign database access libraries, this would be very helpful. One could switch on logging, perform an activity, switch off logging, and look what has happened. Otherwise, the server has to be restarted to change logging, which is a bit annoying...
View Replies !
Running A Query That Returns True Or False
Is there a specific type of query that can be ran to simply check if a field/value exists, and return true/false rather than returning the entire row? For instance, I want to check to see if "pie" exists as a value under the field "apple" in the "table" table. SELECT * FROM `table` WHERE `apple`='pie' Rather than returning an entire row, or even the value of apple for example (which would be the string "pie"), is there a way to have mysql simply return a boolean "true" instead? Thanks.
View Replies !
Running A 'Distinct' Query Returns Some Results TWICE !?
I've spent hours trying to find out why a perfectly simple query that uses the 'distinct' keyword such as: Select distinct(field1) From tablename; works fine based on eg. field1, but when running it on eg. field2 in the very same table, it returns 2 results (yet, only on some words!). Pls see example of result below: Eg of a 'faulty' result: .....
View Replies !
Running Multiple Update Querries In Query Browser
I am trying to run multiple update statements together from the MySQL Query Browser. For example: update table1 set field1 = "123", field2 = '456' where rowid = 'abc' update table1 set field1 = "321", field2 = '654' where rowid = 'efg' I can run them one at a time, but I cannot run multiple updates at the same time. I have 1100 of them to run, so I don't want run them individually. In M$ SQL I can just put a ; or GO at the end of each line to seperate it from the next. How can I do this in MySQL?
View Replies !
MySQL Taking Too Long
I'm trying to run a php script written by someone else, not me, and it's getting stuck in a particular step. Actually it isn't getting stuck per se, but the browser is, because it's taking forever to return the results back to the browser. Here's the line that's responsible for this: $users = $db->query_return_array("SELECT * FROM user"); It's getting stuck because in my database I have over 60,000 records. Now, I'm just wanting to get over this step (it's an upgrade script), not looking for fancy proper methods of php coding. What alternative ways are there for me to prevent the browser from timing out? I'm guessing some way of looping through the records, and updating the client with simple update characters to prevent it from timing out.
View Replies !
How To Insert A Long Xml String In Mysql
I am trying to insert a long XML string in a blob field in mysql. So i am just using a normal insert statement is there an xml function i could use. This way I do have to keep escaping special characters in the xml string when inserting. e.g i am using insert into table values('test','test','test','xmlstring') Some rows go through but other records do not so does anyone know how i could insert an xml stirng which is everything from an xml file but in string format already.
View Replies !
Mysqldump Long Format (mysql 5.0)
Does anyone know how to get mysqldump to dump in the old style dump format? Right now I get dumps which look like: INSERT INTO cart VALUES ((a,b,c),(d,e,f),(g,h,i),...,(x,y,z)); What I want is the old INSERT INTO cart VALUES (a,b,c); INSERT INTO cart VALUES (d,e,f); INSERT INTO cart VALUES (g,h,i); ... INSERT INTO cart VALUES (x,y,z); The new style is somewhat problematic when trying to diff database dumps. I don't want to have to edit the dump file to do this. I don't see an option for it offhand.
View Replies !
MySQL Keeps Going Long After Code Stops
When some queries are executed on a server I have setup MySQL will continue to use up CPU cycles 5-10 minutes after the PHP code that executed the query has long since stopped. The browser page will be loaded and no further PHP code will be active on the entire server that could call MySQL into usage, yet MySQL will continue to use upwards of 80-90% of the available CPU processing power for that 5-10 minutes afterward. In fact, if the PHP page only takes a couple of seconds to load with next to no CPU usage then after it has finished loading MySQL will start utilizing the CPU for all it is worth as if it is trying to complete some task that only it knows about. This is on an isolated server so I know I am the only one using it. This seems to happen most often when a LEFT JOIN is executed, though the query itself is very quick and returns the data in less than a second. I am running MySQL 5.0.15 with Apache 2.0.54 and PHP 5.0.4 on Windows XP SP2. I know this is terribly obscure sounding, but if anyone has any ideas where I could start to look for the source of the problem I would appreciate it. I know it is not in the code because if I run the code on a Linux server this doesn't happen, not to mention the fact that, as I said, the PHP code itself finishes without a hitch.
View Replies !
Long Text Into A MySQL Field Error
I am having a problem putting a certain length of text from a textarea form element into a mySQL field. The field is set to LONGTEXT but I get an error. Whne I shorten the text it writes to the DB with no problem. I am getting a long strng, perhaps 200 characters or more into a variable that will then be written to an mySQL DB but I am getting an error in the DB. How can I set the field to accept more than 400 or 700 text characters?
View Replies !
How To Prevent MySQL Queries From Taking Too Long
I have a very busy database with some tables having hundreds of thousands of records. I am running MySQL 5.0.16 on Windows. Some of the queries running on my database are not fined-tuned enough, and need improvement. However, the system is live in production and I am looking for a way to prevent MYSQL from committing Harakiri, i.e. from running very slow queries forever, taking the cpu to 50% and beyond for hours. My scripting language is PHP. I found that after a while the end user receives a timeout on the browser, but MySQL continues trying to run the query, sometimes for hours. My question is, is there a way to specify a timeout for MySQL so that it will abort any queries that it is running that have not returned a result by then. The end user is no longer around anyway, so I am looking for a way to protect the database resources (and in parallel I will start investigating how to optimize the slow queries).
View Replies !
Running MySQL
I have installed mysql-3.23.54-win and it all seems to have gone OK .... now i want to run it and setup a database. I dont have an icon on the desktop and there is nothing in Start - Programs ..... start it from DOS prompt via C:> C:mysqlinmysql.exe and i get error 2003 cant connect to MySQL server on localhost <10061>
View Replies !
Running MySQL 5.0
I've just downloaded and installed 5.0 on my Pc/ win 98se. When I run the program MySQL Command Line Client, it appears to run for a second then disappears. I see the program flash open for a second and then it is gone.Complete newb needs some help.
View Replies !
MySQL 4.1 Running
I've been running mysql 4.1 for sometime and using phpMyAdmin (v2.6.2) to administer the databases. Using php scripts I can also update/insert etc the databases (maintained on my laptop Mac OS X Tiger). Suddenly, I can't get phpMyAdmin to load in the browser. I've also tried other MySQL GUI tools like CocoaMySQL and Navicat....they won't run either. I downloaded and installed phpMyAdmin 2.6.3-pl1 as well but no improvement. Why would mysql run but the admin apps not work?
View Replies !
Running MySQL From A CD-ROM?
I have used PHP and MySQL for a few years now. Just today I can across an application that had a MySQL database running locally off a CD ROM. I did not know this was posible. When the application runs it starts up the MySQL database without the user even knowing they are running it. It is pretty amazing. So I want to do the same thing. Is there any documentation on how to run MySQL locally. I would like to know how to build the database and create tables under these curcumstances.
View Replies !
Could Not Get MySQL Running
I went to MS-DOS to start the MySQL application by typing mysqld into the bin directory of where I installed MySQL but once I did typed the command and pressed enter this is all I got : A moment passed before I am shown the path of bin with no indication of MySQL server started. And also I have installed this as a window service.
View Replies !
Help Please Running Mysql On Os X
I am very new to mysql. I am using the sitepoint book 'Build your own Database Driven Website using PHP and MYSQL. I have installed mysql mysql-5.0.41-osx10.3-powerpc. Under preferences/mysql it indicates that the mysql server is running. When I try to access mysql through the terminal window I get a message - command not found. Or no permissions. I can go to the bin directory and list the contents - they seem to be there. I can't get past page 21/22 Post-installation setup tasks. I am also new to using the terminal window. I suspect I have missed something really basic - any suggestions on how I can get up and running would be much appreciated!
View Replies !
Running MySQL In RAMDisk
Have a very large database and due to performance requirements it seems that running MySQL in RAMDisk might be a good solution. Access to the database is through PHP.
View Replies !
Running MySQL Win32
I'm an absolute beginner and would really like to read something in the manual to solve this problem, but the manual just take care of Unix and Linux users. Because we develop on NT we wanted to install MySQL with Apache and PHP3 on a NT workstation for faster testing beside our Linux station. But I have problem to start the program (mysql.exe). It just gives back an error: Error 2003: can't connect to MySQL server on localhost 10061 Network is running, I can ping localhost. I don't know what to do to get it running.
View Replies !
Running Backup For Mysql
Can anyone suggest a reliable and inexpensive backup service for mysql? I have about 50 tables, of which I've been doing database backups daily on the server, then downloading the backup every couple days or so. The backup files are starting to get relatively large, and I'd like to find a service to backup to off site.
View Replies !
Running Mysql From Shell
I need to run this sort of querys from shell: delete from 3dinformatica where preco = " " ; CREATE TABLE tudotest AS SELECT DISTINCT * FROM 3dinformatica; DELETE FROM 3dinformatica; INSERT INTO 3dinformatica (cr_datetime,produto,vendedor,preco,link) SELECT DISTINCT cr_datetime,produto,vendedor,preco,link FROM tudotest; DROP TABLE tudotest; i wanted to put the mysql cmd in a file like mysql.sh and run it from crontab. i have about 100 querys like that i need to run at the same time.
View Replies !
MySQL Config Not Running
i'm trying to set up MySQL with IIS 7.0 on Windows Vista Home Premium. After you install MySQL, there's a check box to launch the config app. if i leave it checked, the app does not load. if i try to run the app by double-clicking its icon it gives me an error saying, "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail." I cannot find the application event log, though.
View Replies !
MySQL Running Very Slow
I have the following INSERT SQL, which runs very slow (For 2 full days it had not done anything) on a 2 processor Compaq machine running Suse Linux. Code:
View Replies !
Running Mysql On Old Computers
I´m running mysql on a Pentium 166 Mhz with 16 Mb of RAM. Pretty old, right? I want to know if there is a way to improve performance. I don´t know, something about reducing the number of queries that it will respond or cutting out some features.
View Replies !
Slow Running MySQL?
I'm hoping someone may have an idea what could be causing the slow loading pages of my web-site. I'm not positive, but I'm relatively sure that it's related to a problem with MySQL database. I purchased a program called Sam3 for broadcasting our radio signal over the internet. The software requires the use of MySql in order to set up web pages for our web site. The problem is, that while everything works GREAT (requests can be made from the site, songs can be searched, the history of what we've played shows up) the pages load PAINFULLY slow. Other users of this software have had no such problems so I'm at a loss. I know from testing that the PHP script for the web pages is fine, I have plenty of bandwith both upload and download available on my DSL line, and while the computer running MySQL is behind a router I have tried plugging the DSL line DIRECTLY into the host computer and it makes no difference. For all appearances it seems the problem is that it takes MySQL forever to gather and provide the information needed for these pages. Does anyone have any idea what I should be looking at to solve this problem? I do not know the MySQL program at all, so I get somewhat lost when people start throwing out technical terms, but this has been really frustrating because no one else seems to have the problem and everyone so far has just told me to check the things I've already checked.
View Replies !
On What Port Is MySQL Running?
I'm running MySQL on my Mac, and I'm trying to figure out on what port MySQL is running. What can I type into Unix terminal to figure this out? Or can I find out some other way?
View Replies !
How To Use A Copy Of A MYSQL 4.1 Database In MYSQL 5 Running On Ubuntu Linux
We had a "permanent world" game server running on an older PC, under Ubuntu 5.10, using a MYSQL 4.1 database to store persistent data for the players, then the hard disk quit. We did back up our data on a regular basis, but didn't use MYSQL to do the backups, we simply copied the MYSQL/data/ folder to disk. So now we have a new hard disk, with Ubuntu 7.10 and MYSQL 5 installed. We have everything working, in that we have created the appropriate database and, using a simple test module of our game which will create some of the tables if they don't exist in the database, we can store and retrieve data from the database tables. The problem we have is how in the world do we get the data from the backup copy of the MYSQL 4.1 created database into the new MYSQL 5 database correctly? With 4.1 we could copy the contents of the database folder right into the database folder in the /var/lib/MYSQL/ folder, but this procedure didn't work with MYSQL 5. The files seemed to copy, as in the copy operation gave no errors, but we get an error that says the database is unavailable and to make sure the MYSQL server is running - it is, so we're stumped, and our game server is offline.
View Replies !
Running MySQL Using A Dos Batch File
I am used to use MySQL on Unix, now I have to do some development for MySQL running on Windows machine. The following script works well in Unix but I am unable to run it on Windows. "MY_FLAG" is the one which is causing issue. Due to certain restriction in my framework, I can use the normal batch by supplying the .sql file while opening the mysql connection ( infact i need to run multiple source files) Code:
View Replies !
Error Running MySQL Administrator On RH8
I have downloaded the latest version of mysql administrator 1.0.18. I followed the installation instructions, but when i am unable to run the program. I get an error saying: ./mysql-administrator-bin: relocation error: ./mysql-administrator-bin: undefined symbol: gdk_display_get_type Do you have any clue about what is happening?
View Replies !
How To Verify If MySQL Is Running On My Windows XP?
I uninstalled that and reinstalled that. Then it doesn't work anymore... I check the process of the "Windows Task Manager", but I couldn't find the fimilar mysql-nt.exe... Do you have any idea how should I fix this problem? Should I reinstall the whole XP system?
View Replies !
MySQL Administrator GUI Running Slowly... WHY?
We have created an instance or schema that contains over 14000 tables. It is a lot of tables. When we attempt to browse the tables in the GUI it literally takes 5 minutes or more for it to come back. Granted when using the Microsoft SQL Server Management Studio it is slow but doesn't take that long. After about a minute or so it gives the list and is kind of slow to scroll. Can this be fixed by optimizing the database? Is this just too many tables for mySQL to handle?
View Replies !
Running Mysql Code Within A Php File?
I have been given a some mysql code that I have to run within a website - I am familiar with mysql in terms of insert info and querying a database but I at a loss as to how to make this work. the mysql code works in mysqladmin, but how do I call it into my php code? BTW the mysql code creates a new record in the database ....... Also, I need to tweak the code so it runs in a loop for different variables - in php I would run a FOREACH query, how do I do it in mysql?
View Replies !
Detecting If MySQL Server Is Running
I write an application which saves/loads data to/from database. I created a table and I'm reading an informations from it. The problem is when server is stopped and my application tries to connect to database it terminates. I think it shouldn't happen. I want my application not to terminate while it can't to connect but give me some kind of error and continue its run. How can I do that? And at the end I would like to say that I'm writing my program in c++ using .net. My piece of code: ....
View Replies !
|