MySQL Query Times Out From Page But Not Console...
The query works ok when executed from the console, but never executes from the any page. - When I use MySQL Administrator to view the threads this particular thread gets stuck on "copying to tmp table on disk"...
View Complete Forum Thread with Replies
Related Forum Messages:
Page Times Out But Works After Refresh
I have been developing a page that displays survey results data. There are many SQL queries but has worked so far. Recently when I click the link to the page the page times out but if I refresh it displays the data correctly. Are the results of a query stored so the refresh of the page works quicker?
View Replies !
Blank Page In Php Page With Mysql Query
I've installed PHP 5.1.2 manually, along with MySQL 4.1.18. Any php page that contains a mysql function displays a blank page . I read many article on mysql and php configuration and did not find any issue ... I copied the libmysql.dll to the system32 directory I set the extension_dir in php.ini to the extension directory of my PHP installation directory I enabled the MySQL extension in php.ini by uncommenting the line extension=php_mysqli.dll I tested the mysql connection from a dos prompt it worked , i can check ith a show database the list of the databse . But each time i put come synatc mysql in a php page the resultis a blank page . I read that we neee in php5 mysqli.dll but I found only mysql.dll do i have just to renme it..?
View Replies !
Measuring Query Times
I have read a few posts here and see that some people have questions regarding the length of time it can take to perfrom their queries. I would be quite happy reaching that stage because at least I would know how long mine take. :| How can the time delay be forced to output? Using MySQL 5.0.
View Replies !
Report Of Query Execution Times
Does mysql have a tool to record and report a list of all queries executed and how long it took to execute each query? If not can anyone suggest a tool I can use to do this? I've heard of mysql query profiler but does it capture queries from all sessions?
View Replies !
How To Find Out How Many Times A Query Has Been Executed
How can you count the number of times your query has been executed? So I'm trying to set it up, so that I get a variable on every time someone views a review. I have two querys right now, but honestly don't really know what I'm doing. And I'm assuming I have to increment viewcount everytime that query gets executed. This query looks up the review:
View Replies !
Query Single Table, Multiple Times
Before i narrate my issue, i would like you to preview my table structure : Table name = machine_info +------------+----------+------------+ | machine | tag_name | tag_type | +------------+----------+------------+ | machine101 | sge | farm | | machine101 | US | site | | machine101 | CRITICAL | status | | machine102 | CANADA | site | | machine102 | UP | status | | machine102 | sge | farm | | machine103 | CHINA | site | | machine103 | DOWN | status | | machine103 | sge | farm | | machine104 | US | site | | machine104 | CRITICAL | status | +------------+----------+------------+ Requirement : I would like have machines from all 'sites' (almost 15 in the actual db) with 1)status='DOWN' 2)status='CRITICAL' 3)status='UP' Example: (Here the results would be like) SITE|DOWN|CRITICAL|UP US |0 | 2 | 0 CANADA|0|0|1 CHINA|1|0|0 I use php to extract information, here's what i do : <?php $db = mysql_connect("hostname", "user", "password") or die(mysql_error()); $selected = mysql_select_db("dbname") or die(mysql_error()); $site_codes = mysql_query("select distinct(tag_name) from machine_info where tag_type='site';"); echo "SITE|DOWN|CRITICAL|UP ";
View Replies !
Like '%VAR%' On Mysql Console
I have a varchar ID column that is like this: 0103 (CATEGORY) 010302 (SUB_CATEGORY) This IDs identify categories, and what i see in my table is that some categories has no Sub_Categories and i need to remove than. So, i need to select the category who has no sub-category. This field is a varchar one. So, how do i select the IDS who has a like 'ID_CAT' that mysql will take ID_CAT as the values of the table, not the chars 'I''D''_''C''A''T' I mean: select ID_CAT from mytable where ID_CAT not in (select ID_CAT from mytable where ID_CAT like 'ID_CAT%'); This way, the sub-select will return me IDs who begins with ID_CAT, not the values of the field...
View Replies !
MySQL Console Vs PHP
What would be the way about using a mysql command of mysql -e "SELECT * Table_Name" >~/dir/filename inside a PHP file or is there an easier way to automate export of tables without local access to the database server, ie only the hosting companies compter has access to the database server and I am trying to make a local copy but can handle using the above idea that will create a copy on the hosting machine.
View Replies !
Mysql.exe Console
When i try and use the console ver of mysql.exe to create a database using "create database testing;" "ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'testing'"
View Replies !
How To Run A Query Without Reloading A Page (PHP)
Lets say I have a lot of toggle buttons (as checkboxes) that I want to automatically update in a table when checked or unchecked, but I don't want to reload the page for each one just to run the query. Is there a way to run the queries without reloading the page? I've been trying to output the PHP code using JavaScript but I'm not having much luck.
View Replies !
How To Run Mysql Console After Install ?
On windows xp I enter mysql -u root gives ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N O) mysql -u root -p gives a silimar error. How do you first start (login to) mysql console? What is the default password?
View Replies !
Windows Command From Within The MySQL Console
Is it possible to execute an MS-DOS command from within the MySQL console? I know that the Linux version of MySQL contains the SYSTEM command to execute shell commands, but there doesn't seem to be anything similar in the Windows version. Futhermore, is it possible to run mysqldump from the MySQL console?
View Replies !
Mysql Console Parsing Error: 1064
it won't let me create this "mytable". Here goes my ER_PARSE_ERROR. mysql> CREATE TABLE `mytable` ( -> `mytable_id` int(25) NOT NULL auto_increment, -> `mytable_title` varchar(100) NOT NULL default '', -> `mytable_dts` varchar(25) NOT NULL default '', -> `mytable_caption` tinytext NOT NULL, -> `mytable_full_body` text NOT NULL, -> PRIMARY KEY (`mytable_id`) -> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Testing Full Text Search Functionality.'; ERROR 1064: 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 'DEFAULT CHARSET=latin1 COMMENT='Testing Full Text Search Functi At the same time while inserting a large text as pasted to mysql console, only couple of lines gets there. INSERT INTO `mytable` VALUES (1, 'Mozilla Firefox is Cool!', '1111813200', 'Mozilla Firefox blah blah .... more 500 words '); I guess, the mysql console is limiting the size while inputting. Do I have to edit that my.cnf file?
View Replies !
How Call/pass A DDL Script In MySQL Console?
I started successfully the MySQL console mysql.exe. How can I call (and execute) from this MySQL console an external file (say D:myprojmyinit.SQL) which contains DDL statements? Secondly how can I pass the same file as a parameter to mysql.exe when I start the console?
View Replies !
ERROR When Setting Password Via Console (MySQL V 5.1.30
I am trying to set a password via the console with the following: mysql> update user set pasword - password<'password'> where user = 'root'; and receive the error message: ERROR 1064 <42000>: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where user = 'root'' at line 1
View Replies !
MySQL Console Not Accepting Spaces Or @ Signs
I'm following the Sitepoint book "Build your own... database driven website" book. It's told me to get on with adding some entries into a table. When I enter: INSERT INTO author (name, email) VALUES (Kevin Yank, kevin.removethis@.removethissitepoint.com); It returns the error: Error 1064: You have an error in your SQL syntax near 'Yank, kevin.removethis@.removethissitepoint.com)' at line 1
View Replies !
PHP Page Displaying When First Hit, Page Not Found On Refresh.
I have installed MYSQL sucessfully and PHP. I usually code in ASP (I know, I know) & SQL Server (Yes OK). And have recently turned to the light! When I load a page for the first time (On IIS) it looks fine and new data change in the database is displayed and it looks great. When I click a link to another page with links to the DB then I get Page Cannot be found, if I go back to the URL for the site (thus index.php) Refresh and then click the link it works??!
View Replies !
C# Console (exe) Application Crashes On Open Command (MySql)
I have problem opening an MySql connection from an win console application. I am using SharpDevelop as IDE. Previously I've been working with MySql through C# aspx and am new to writing exe programs in C#, so I assume that I might be missing something in the IDE / project configuration. I am successfully opening a connection and reading data from the table using adapter (window panel application binding to a grid), but when trying the code below in an console application the program crashes when calling the MyConn.Open(); function. The error message being: Exception MySql.Data.MySqlClient.MySqlException was thrown in debuggee: Unable to connect to any of the specified MySQL hosts. Open() If I break before the MyConn.Open(); function is called, the MyConn variable is filled with lot's of info looking ok to me, though I am not capable of knowing if any of it can tell me what leads to the crash in the next function call. Ive added the MySql.Data.dll to the project from the GAC list in the add reference panel. Further, in addition to the references, I only have an AssemblyInfo.cs file and the Main.cs file with the code below in the project I've reinstalled the MySql database trying different configurations etc, but whatever I have tried does not work. Has anybody else encountered this problem and or know the solution?
View Replies !
Count Of *unique* Visits By Page For Each Day (was "Need Help With Query")
Using MySQL 4.1 I have a table 'orders' with the following fields: ipaddress pagenum xtime (which is just the yearmonthday) this is the query: SELECT distinct pagenum,ipaddress,xtime,count(pagenum) AS pagenumtotal FROM `orders` group by pagenum,xtime ORDER by xtime, pagenum asc What I am trying to do is return a count of *unique* visits by page for each day. This query returns a count of *all* visits by page for each day, including repeats. So if a visitors hits a certain page on the site 10 times and adds a record 10 times, the count result will include all 10 records in the count. I want this to only count as 1.
View Replies !
Which Is Faster In MySQL? Comparing Unix Times, Or DATETIMES?
I'm leaning towards using unix times inserted into my MySQL for ease of use in manipulating the data with PHP. I think this will be the final decision, which one would be faster? -- Mysql: * INT (4 bytes) * DATETIME (8 bytes) * TIMESTAMP (4 bytes) -- My PHP application does alot of querying from the database to compare specific data within TIMERANGES, so always, I'm querying with "time >" or "time <". My question is would doing the WHERE time query with the native MySQL DATETIME be faster, than doing a WHERE query with the unix timestamp?
View Replies !
Use MySQL As Part Of A Web Page
I would be interested in hearing opinions on how easy or difficult it it to use MySQL as part of a Web page. I have no experience with MySQL, but I have experience with MS Access and VB. The project that I'd like to put together is an online ordering facility for videotapes, not too many concurrent users and relatively low volume as these things go. I am also interested in how one would go about integrating the MySQL database with a site constructed with MS FrontPage (2000 or 2002).
View Replies !
Mysql Error Page
Hey would anyone have a script that redirects traffic to a different page if there is a mysql error, or... know where to get one?
View Replies !
Start Mysql From A Web Page
I built a script to start the MySql server and I have the script located in my cgi-bin directory. This is my script: /bin/sh -c "cd /u1/mydir/mysql ;./bin/safe_mysqld &" from the command prompt it starts the server but when I try it from my web page I get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. I can run other cgi's just fine, I have the permissions set to 755. I hope one of you expert know how to do get around this.
View Replies !
MySQL Page Crashing
I have a simple ASP page, which uses GetRows to display the value of a fieldname within a DB. This page works with a mySQL db I have, which is only 10 records. I have another database (same format), which contains 1.7 million records and doesn't work. The page sits there for a bit, then crashes, displaying a "page cannot be displayed" error. How can I find out what's going on? Where is the problem occuring, etc.
View Replies !
Mysql/php Search Page
I need to make a database with following three items. 1) City Name 2) Country in which city is located in. 3) City's Zip Code That will be the MySQL part. On the php section. I want to make a search.php page in which you can type any of the above and it will return a small table with all of the values. For example. If in my database. there were: San Fransisco, California, 95001 San Jose, California, 95111 new york city, new york, 10111 and in the search.php's search box if I was to type 10111. The results will return me New York City, New Youk, 10111.
View Replies !
Save HTML Page In MySQl
What is the best way to save a HTML page in MySQL? I just need the text not the images. I intend to save several 1,000 pages. Should I create a field or referance the pages which would be saved as html files to a directory. I'm not sure what the pros/cons of each method or if there are any other ways to do this.
View Replies !
Returning MySQL Blob To Page.
I have a blob field in a database and a type field. The blob will either contain a zip file or a gp3 or gp4 file. I need to return this blob so that the user can download the file. I can download a zip simply be setting header type to application/zip and returning the blob but how do I return the others, can I just put application/$type?
View Replies !
How To Display MYSQL Data On Index Page
I am totally new to web programming. I have a MYSQL database with fields date(date, field) Celebration (variable) and slogan(variable). It contains the data for which ecah day is celebrated . eg. Date Celebration Slogan 1st Dec. world AIDS day We Care 25th Dec Christmas Merry Christmas I want take put these 'day celebrations' on my index.html page, two days in advance eg. on the 23rd Dec., I should display "Merry Christmas" On the 26th, this should be removed.
View Replies !
Delayed Page Refresh SO MySQl Can Catch Up
I have a page that displays information from my MySQL database. On this page I also allow the user to make changes which in turn changes and updates the database. When the user hits the submit button, my database information is changed but it's not changing "quick" enough for the webpage to load the new information. If I want to see the changes I made through the webpage I have to refresh twice to see it. Is there a way to delay the page from refreshing itself long enough for it to see the changes in my database or any other work-around?
View Replies !
How Can I Import Sql Through Command Console?
I found that I can import sql through command console mysql -u username --default_character_set utf8 -p password -h localhost databasename < C:/data.sql mysql -u username --default_character_set=utf8 -p password -h localhost databasename < C:/data.sql However, it shows only the mysql version and variables and did not import.
View Replies !
Redirect Error Output From Console
I have MySQL 5.1 installed under winXP. I'm trying to execute simple query from console, like the following: mysql.exe -u<user> -p<password> -D<dbname> -e "drop table if exists mytable" I observed that, if there's some error (it does not matters the specific error or the specific query), mysql redirect the error message to the standard output for the console. But I need to redirect error messages to a specific file. I tried: 1) mysql.exe -u<user> -p<password> -D<dbname> --tee=C: eefile.txt -e "drop table if exists mytable" 2) mysql.exe -u<user> -p<password> -D<dbname> -e "drop table if exists mytable" >> C:outfile.txt 3) mysql.exe -u<user> -p<password> -D<dbname> --tee=C: eefile.txt -e "drop table if exists mytable" >> C:outfile.txt In case 1) teefile.txt is created but it is completly empty. In case 2) outfile.txt is created but it is completly empty. In case 3) (a combination of 1 and 2) both teefile.txt and outfile.txt are created but while teefile.txt is still empty, in outfile.txt there's a single line: Logging to file 'teefile.txt'. But if there was an error in the query, the console shows a message about it, and there's no trace of that message in the files created.
View Replies !
Aborting Output In Windows Console
Occasionally, a mis-constructed SELECT statement will result in tens of thousands of data elements streaming by on my Windows console. How to I abort this output, and return to the MySQL prompt? (Note: <ctrl>-C aborts the entire window, requiring me to restart the window and logging back into MySQL.)
View Replies !
Error 1064 Console On WAMP Server
I am working through an SQL book which gives this example to create authorization for access to a database CREATE SCHEMA AUTHORIZATION JOE CREATE VIEW NEW_CARS AS SELECT * FROM CARS WHERE YEAR >1990; I get a 1064 error with using this code.I am using the MySQL console on WAMP SERVER v 2
View Replies !
Appear 2 Times
i'm having this problem finding out the right sql query. i have two tables A & B the userid in table A appears as FK in table B i need to list userid that appear 2 times or less in table B which has a where clause column3='Yes' how do i go about it>?
View Replies !
Next And Previous Buttons MySQL Rows Displaying 3 Rows Per Page
I have got a table "members" and the DB name is "jutland". I have got columns - id, name, surname & email. I want to display 100 records with 5 rows per page using PHP going back and forth with previous(previous 5 rows) and next (next 5 rows) links. I have the knowledge of the LIMIT x, y condition but still stuck on passing required parameters.
View Replies !
Comparing Times
I'm creating a voting system, and want to prevent people from cheating. Therefore I'm logging their IP, and the time they voted, and what I'm planning to do is have a script which will delete any records which have been in the database for say 24 hours. To get the length of time I was gonne use: HOUR(TIMEDIFF(NOW(),time))
View Replies !
Number Of Times
I have a query that grabs 500 rows from 1 field within 1 table. In this table. Each user will have 500 rows associated to them from within that table. So if there are 2 users then there will be 1000 rows. Each time 1 user executes the query, it grabs their 500 rows. If 2 users execute the query simultaneously, then this means that there are 1000 rows, all of which will be selected; 500 by one user and 500 by the other. If 3 users access the table simultaneously, then there are 1500 rows and so on. My question is how many users can execute this query simultaneously before we see performance loss?
View Replies !
Records Between Two Times
I have a table for a restaurant database with two fields open_time and close_time in TIME format. I want to be able to select all records that fall between open_time (when the restaurant opens) and close_time (when the restaurant closes). I have this query: Quote: Select hours_id from hours where curtime() between 'open_time' AND 'close_time'; It partially works, but its not working if the close_time is after midnight (i.e 1am = 01:00:00 in database). I can't figure out the issue with the difference between AM and PM.
View Replies !
One To Many Multiple Times
I have a 'links directory' database that currently contains 4 tables: category, subcategory, region and links. My links table contains company names and, among others, three fields catID, subcatID and regID. Each of these are related to primary keys in the other three tables, category (catID), subcategory (subcatID) and region (regID). My issue is that the records in the links table can be in multiple regions, multiple subcategories and multiple categories, but the way I have it designed, each record in links can only be associated with a single catID, subcatID and regID. Currently the only workaround I can think of it to have duplicate entries in the links table for a single company, but with every variation of catID, subcatID and regID. This will result in a very large table, but I cannot currently think of any better idea.
View Replies !
Dates And Times.
You can't have two timestamp columns in a database both with the default now(). - why I would want to is not the issue. You can't use the data and time functions, such as CURRDATE()/CURRTIME() provided by MySQL as defaults for date/time type columns. Is there a way to use something like 'select currtime();' as the default for a column? so my question is, how do I use ANYTHING other than one timestamp with the default value of now() for date/time defaults in MySQL.
View Replies !
Run-times On SQL Commands
Does anyone know where I could find explanations/descriptions of runtimes on sql commands like select and functions like max(). In other words if these are linear functions/commands or log based?
View Replies !
|