Slow To Get "C:/mysql>" Prompt
I'm setting up MySQL, Apache and PhP on my pc - Win98, 128meg to work on a project.
My problem is this - I have installed MySQL and find that if I go into it via the DOS prompt (C:/mysql/bin/mysqld) it takes at least 10 minutes before the C:/mysql> prompt appears and I can start using it ... this I'm sure is not right ? I have tried with the mysql admin tool but it too takes ages to load ???
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Getting The "mysql" Prompt
I installed MySQL4.0. No for creating a databse the help says like go to "mysql>" prompt and then enter some commands. How do I get this prompt.
"use Database" And Slow Log File
I have an application, which normally looks at two InnoDB databases: 1) db1 with approx 100 tables for usual queries and 2) db2 with 2 tables for registration of visitors (cake_session). naturally, queries appear independently and there are a lot of queries in a slow log file after commands use db1 and use db2. Need the commmand "USE" much time? How can I reduce this time? Is it usefull, if I make "USE" only for db1 and access the table cake_session like INSERT INTO db2.cake_session ...?
REQ: MySQL 4.0 Equivilent Of "DateDiff("m", Date, Now())=1"
I have a query that works in the rest of the SQL world "SELECT invoice.*, invoice.Date FROM invoice WHERE (DateDiff("m", Date, Now())=1);" which will give me all of last month's invoices. However it doesn't work with MySQL 4.0. While "SELECT Invoice.* FROM invoice WHERE (Month(Invoice.Date) = ((Month(Now()))-1))" Is a close substituent, it will blowup in January. Anyone have an equivalent expression for MySQL 4.0?
Searching For Numbers - "close To" Or "approximate"
I would like to know how to search a table for records where a particular field is "close to" a particular number. For instance, let's say I have a table containing students and their most recent test scores. I'd like to see students who scored 7/10. That's easy enough (select * from table where score = 7). I'd also like to run another query to identify other students whose scores are not 7 but "close to" 7. Ie students who scored 6 or 8. As an added bonus, I'd like to be able to do a related search that shows students who scored 7, then shows the other students ordered by how "close" they are to 7. Ie students who scored 6 or 8 are "closest" matches, and students who scored 1 are "furthest". I hope this makes sense! Is there any pre-existing MySQL command that will do this? Or will I have to run separate queries for each value?
Value "000" Stored As "0" In Text Field?
I've managed to import my data from a CSV using SQLyog Enterprise, however, I have a problem with the table storing the text value "000", MySQL truncates it to "0", unfortunately, I need the value to be stored as "000", does anyone know of any way that I can force the field to store all the characters, rather than treating it as a number? Surely a text field should treat any numbers stored within it as text?
Return A "true" Or "false"
i wanna do a "select", where if the script finds any matches, i dont wanna know about them. Instead, i just want it to return a a value: true (1) ou false (0). ie.: $sth = $dbh->prepare("SELECT * FROM maps WHERE name='algo' LIMIT 1"); $sth->execute(); if (match is true) { print "True Match. A match was found"; } else { print "False Match. No matches were found."; }
"Group By" Forgets "Order By"
I'm trying to build a simple RSS reader for a client and am running into some serious problems with the GROUP BY in MySQL. Basically I have two tables: one that holds all the entries and one that holds all the feeds. Then what I can do is say: [MYSQL]SELECT * FROM entries WHERE feed_id='13' ORDER BY date DESC[/MYSQL] That will select all the entries that belong to feed #13. This is fine, but what I'm doing now is building a library that will display the feed_id with the latest entry with that id. So I would think it would be something like the following: [MYSQL]SELECT * FROM entries GROUP BY feed_id ORDER BY date DESC[/MYSQL] That should get me the single latest entry from each feed_id. However it's forgetting the ORDER BY clause all together and seemingly ordering it by the auto-incrememnt value in the entries field.
REGEXP To Find "foo-bar" And "foo Bar"
Does somebody know how to solve this: select * form geo,places where geo.name = places.name Where geo.name could be New York and geo.places could be New-York
Maximum Execution Time Of 300 Seconds Exceeded (was "MYSQL Error")
I have a huge database 400mb+ in size which i have exported into a .sql file. I tried to run this export script into a new database and it runs fine until three quarters into the scripts execution and the following error appears: 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 '<br / > <b>Fatal error</b>: Maximum execution time of 300 seconds exceeded in <b' at li ne 1 I believe this error may relate to "delayed_insert_timeout = 300". How do I increase this limit in mysql - maybe it may solve the problem but then again it may not . Any advice is most gratefully appreciated - As you can imagine if the script runs fine for 3/4 of it and then an error appears, stating the error is on line 1, it will take me days to go through the whole script (hundreds of thousands of rows) to find the error as I assume the error does not reside on line 1 as this line would have been executed. I am running the script on mysql 5, and via source /path/****.sql on linux.
Store Web Site Club Registration Data (was "MySQL Question")
I am working on a website for a club. One thing that they want included in the site is a way for people to register online for the club and their services and for this information to be put into a database for the owners to view. Is this something that I can do with MySQL?
Batch Mode Feedback Of "mysql" Command Line Tool
while writing a bash shell script to backup some databases and I am having slight problems with the mysql command line tool's feedback. Here goes command line: #!/usr/bin/env bash mysql -ubackup -e "UPDATE `mydb`.`sysvar` SET `val`='backup' WHERE `var`='updateState' AND `val`='0';" The backspaces are nescessary for the shell, otherwise it'd interpret whatever is inclosed in --> ` <--- as command. The problem is, I need to know wether a line has changed or not. The command always returns 0 (that is a success in Unix/Linux) if it was successfully executed, no matter wether or not a line had been changed, and produces no output at all. Could anyone tell me how I get that info?
Encountering 2013 Error ("Lost Connection To MySQL Server...")
I have a nightly job that performs backups on my MySQL servers. There are three production MySQL instances on different machines. My backups have been running successfully for months (until now). However, on last night's backups for one instance, a couple of database/schemas (appear to have) backed up successfully, but the larger schemas failed, as follows: ======================================= Backup of schema dhunt was successful in 0 seconds Backup of schema mysql was successful in 0 seconds Backup of schema support_appl was successful in 0 seconds Error: Backup of schema support_dict was not successful (1115 seconds): mysqldump: Got error: 2013: Lost connection to MySQL server during query when retrieving data from server Error: Backup of schema test was not successful (0 seconds): mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect ======================================= I re-ran the backup cron job with the same results. Does anyone have any troubleshooting suggestions?
"supplied Argument Is Not A Valid MySQL Result Resource" Error
i am getting this error with the following code: $query = "SELECT title, firstname, surname, address1, address2, address3, postcode," ."tel, mobile, email" ."FROM user" ."WHERE username='$valid_user'"; us.skill_id=s.skill_id" $result=mysql_query($query); $num_rows=mysql_num_rows($result); $row=mysql_fetch_array($result); The error is referring ot the last 2 lines of this script.
Linking Stores With Products (was "MySQL Dificult Code")
I have a MySQL database dificult (for me anyway..). I have a ecommerce site with a table of products. Now I want to create a new table with a list of stores where clients can find near home those products. In a limit situation I can have a list of all products indexed in one store (and the products list is increasing everyday, the same with the list of store...). I want this feature to be capable of introdution of new products in a store that already as several products. My idea is to develop 3 tables: Products +----+-----------+--------------+ | id | name | description | +----+-----------+--------------+ | 1 | xxxxx | aasa... | | 2 | vvvvvv | asasasasas... | +----+-----------+--------------+ Stores +----+-------------------+-----------+ | id | store | address | +----+-------------------+----------+ | 1 | aaaaa | street1... | | 2 | bbbbbb | street2... | +----+-------------------+-----------+ Linking stores with products +----+-------------------+-------------+ | id | store id | products id | +----+-------------------+-------------+ | 1 | 1 | 1;2 | | 2 | 2 | 2 | +----+-------------------+-------------+ Can I implement this in MySQL? I mean how can (if I can) place several ids in a field? and how can I do the query in order to list the products inside a store? Hope that I made my self clear. If not please do not hesitate to request further information.
What Is Execution Time Of A Query Based On? (was "a Mysql Question")
when selecting data from the database, does the time taken to retrieve it vary from 56k connections to T3 connections? or does it all depends ont he general server speed/amount of connections on the db? im not sure if ive explained that in the best way for people to understand but im sure someone will get what i mean
Adjacent Theater Seats (was "mySQL Query Issue")
Having not been working with more than a simple SELECT * from table query, I am having a few issues when it comes to using more complex queries. I am currently using a query to select seats from a database using the following query: $query1 = mysql_query("SELECT struct.seatid, struct.row, struct.seatnum FROM seats as seat LEFT JOIN structure as struct USING (seatid) WHERE seat.showtimeid=".(int) $_GET['id']." && seat.available = Ƈ' && seat.timelimit < $minutes2 ORDER BY seat.seatid ASC"); For each record that is selected I want to check if either of the seats either side of it are also selected, if not then it is not to be shown. I have added a while loop below the above query and run another query following it (not sure if that makes sense, so I will paste it below!) while($rows = mysql_fetch_assoc($query1)){ $minusseat = $rows[seatid] - 1; $plusseat = $rows[seatid] + 1; $queryminusseat = mysql_query("SELECT * from seats LEFT JOIN structure WHERE seat.showtimeid=".(int) $_GET['id']." && seat.available = Ƈ' && seat.seatid == $minusseat && seat.timelimit < $minutes2"); $num_rows = mysql_num_rows($queryminusseat)or die(mysql_error()); echo "$num_rows"; //if($minusnum > 0){ //echo "$minusseat <b>" . $rows[seatid] ."</b> $plusseat <br/>"; //} else { //echo "<font color=red>$minusseat <b>" . $rows[seatid] ."</b> $plusseat <br/></font>"; //} } The code above is used below the initial query and the following error is being displayed: Quote: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:Program Filesxampphtdocsprojectprototype1 ickets.php on line 154 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 seat.showtimeid=1 && seat.available = Ƈ' && seat.seatid == 1 && seat.time' at line 1
How Can I "see" A Table In A Database On A Remote MySQL Server After Creating It
I used the following SQL to create a new table in a database on a remote MySQL server by copying one already there. I know the table exists SOMEWHERE in cyberspace. I can read its data, write to it, delete from it. But I cannot see it. The only way I know it exists is by running this SQL from Access 97 pass through query: SELECT ALL new_tbl.name FROM new_tbl The database resides on a MySQL server that was created with a single table (named test) in it for testing purposes. I ran the following SQL to create another copy of the table in the same database named: new_tbl CREATE TABLE new_tbl SELECT * FROM test; I cannot see the new table in the Access 97 database window under the Tables Tab. Anybody know how to overcome this? Its a severe drawback to programming efforts not to KNOW what tables are in your database.
Multi-table UPDATE Problem (was "mysql Question")
$sql = "UPDATE char_lair , char_main m SET l.zip_id='$zip', l.lair_addr='$address', m.alias='$alias', m.real_name='$name', m.align='$align' WHERE m.id = $cid AND m.lair_id = l.id"; I am using mysql v.3.23, I got error in this code but can't find the solution. The message displayed in browser is: --------------------------------------------------- UPDATE char_lair , char_main USING char_lair l, char_main m SET l.zip_id='z3', l.lair_addr='a3', m.alias='ch3', m.real_name='rn3', m.align='good' WHERE m.id = 2 AND m.lair_id = l.idYou have an error in your SQL syntax near ' char_main USING char_lair l, char_main m SET l.zip_id='z3', l.lair_addr='a3'' at line 1 ========================================= Is there any syntax error?
Compare 2 Tables And Find Rows Which Don't Match (was "Mysql Noob Question")
I have a products table and a products_description table. They both have products_id as primary key. However, products_description table has more products_id keys then the products table. How do i compare the 2 tables and show just the products_id that dont match from products_descripition table? SELECT products.products_id, products_description.products_id FROM products, products_description WHERE products.products_id != products_description.products_id; I tried that query but got some wierd results and also the results gave me 2 columns when I just want one.
Error: MySQL Client Ran Out Of Memory (was "Urgently Need Help")
I'm having a big trouble with this query select *, UNIX_TIMESTAMP(date_submitted) as postedon, UNIX_TIMESTAMP(DATE_ADD(date_submitted, INTERVAL auction_period DAY)) as expiry from bidsnbuys_products where approved='yes' It works before but lately we've got a huge records and if our customers search a product it will give them an error, I even tested by myself and the error is MySQL client ran out of memory Is there a better mysql query with my query above?
Help! MySQL DB Transfer Is Adding "�" To The End Of Some Sentences
I'm transferring databases from one hosting account to another and my transfer seems to be adding little squares to the end of some sentences but not all. the squares look like "lower.�" You can see an example at http://www.alohaupdate.com/2007/02/2...ents-a-gallon/. If you can't see the squares, give it an hour. I switched hosts as mentioned and it's taking the full 24-48 to propogate around the world. The old host is using MySQL version 4.0.27 and the new one is using 4.1.21, should transfer nicely. I've done version 4 to version 5 before just using the INSERT functions and this never was a problem. I don't even know what that thing is.
Unchecking The Enable TCP/IP Option (was "Mysql Problem")
I have had a problem with Mysql so I downloaded it again but after configuring it would not start so reconfigured and unchecked the enable TCP/IP box in the networking options and Mysql worked fine. But can’t get PHP to connect so I think the enable TCP/IP box should be ticked. So I thought I would do better with a complete re start. I have removed and reloaded several times but the same problem occurs every time.
Error Importing The .sql File (was "MySQL Problem")
I ahve just exported about 8-10 of my tables from one database into a .sql file and then tried importing the .sql file into phpmyadmin on my local localhost serer and am getting this error? You have an error in your SQL syntax near 'ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1 INSERT INTO `atm_areas` ' at line 22 Why?
Change Premiums Currently 0 And Make Them 1 (was "MySQL Question")
I need to make a change in my database but I am not sure of the query to run. I am using PHPmyAdmin to do the work so bear with me on this one. I need to change 115 Rows in a column called premium. They are all curently set to 0 I need to make them all 1's with out going one at a time. is this possible and how do I accomplish this?
Please Explain MySQL Distinct Table Types (was "Where To Use ?")
These are the MySQL distinct table types. MyISAM MERGE ISAM HEAP InnoDB BDB or BerkeleyDB Tables so please anyone help me to find out the use of each n every type. it will be very helpfull for me if you people can provide simple meanings rather than technical. For Ex : why to use MERGE over HEAP or something like this Your help is most welcome
Follow Up Questions On EXPLAIN Output (was "mysql Help")
explain SELECT * FROM job JOIN job_postings ON (job.jobid = job_postings.jobid) JOIN companies ON companies.companyid = job.companyid WHERE job.jobid IN (16189,16188); +--------------+-------+-------------------+---------+---------+-------+------+-------------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +--------------+-------+-------------------+---------+---------+-------+------+-------------+ | job | const | PRIMARY,companyid | PRIMARY | 4 | const | 2 | | | companies | const | PRIMARY | PRIMARY | 4 | const | 2 | | | job_postings | ref | PRIMARY | PRIMARY | 4 | const | 8 | Using where | +--------------+-------+-------------------+---------+---------+-------+------+-------------+ 3 rows in set (0.00 sec) Follow Up Questions Explain any optimizations that can be made to the above query. How many rows will be analyzed by this query?
Next And Prev DisplayOrder Values (was "Help With MySQL Query")
I have a table 'Album' containing columns 'PageID' and 'DisplayOrder' (both INT). On each page that is displayed I want to have 'previous' and 'next' links to other pages, which are arranged via the DisplayOrder column. At the moment I'm doing this in 2 separate queries: SELECT DisplayOrder FROM Album WHERE PageID = $currentPage $currentNo = [result of last query] SELECT PageID FROM Album WHERE DisplayOrder IN ($currentNo-1, $currentNo+1) Highly simplified but you get the idea. Would it be possible to combine this into one query?
Script To Change All Columns (was "mysql Query")
I have a table. I need to make some changes like change column name, change int() to var() etc. So I want to write a query that alter all the columns of the table then the data which were in the database before can be reinserted.
"Lost Connection To MySQL Server During Query"
Bog standard SuSE 8.2 Linux install. I have installed mySQL (off the SuSE 8.2 distro CDs). I can connect locally, e.g: bealzebub> mysql -u root -p mysql -h localhost ....logs me in just fine. However, this: bealzebub> mysql -u root -p mysql -h bealzebub ....causes the connection to fail with: "ERROR 2013: Lost connection to MySQL server during query". Its the same if I try to log in from another machine.
"Lost Connection To MySQL Server During Query"
Hi, I wonder if anyone can help me with this. Bog standard SuSE 8.2 Linux install. I have installed mySQL (off the SuSE 8.2 distro CDs). I can connect locally, e.g: bealzebub> mysql -u root -p mysql -h localhost ....logs me in just fine. However, this: bealzebub> mysql -u root -p mysql -h bealzebub ....causes the connection to fail with: "ERROR 2013: Lost connection to MySQL server during query". Its the same if I try to log in from another machine. Anyone?
Files "-bin.xxx" Created In Mysql/data Subdirectory
I'm using an old version of Mysql : 3.23.58 In this version (may be it is the same in the latest one) some files named :<machine>-bin.001 , 002, 003, ... are created some times to times in the mysql/data subdirectory. Is somebody have some information about these files ? What are they including ? When are they created ? Can I remove them ?
Getting Dreamweaver 8 To Work With MySQL: The "Unidentified Error"
I set up MySQL on my Macintosh at my job (G4 / OSX 10.3.9) 3 days ago, along with PHP -- all went fine, & I got MySQL started, a DB set up -- until I tried to connect Dreamweaver to it I go to connect to the DB in Dreamweaver 8, and when I try to set up the DB in the "databases" tab and click on the "database" field I get : "An unidentified error has occurred" Code:
"Host Not Allowed To Connect To This MySQL Server"
I just recently installed Fedora Core 4 and was just messing around with the MySQL server, I tried using mysql-administrator to connect to the server and i get this strange error "#HY000Host '192.168.1.104' is not allowed to connect to this MySQL server", I saw mysqlaccess and tried granting myself access to this server but i still get the same error while trying to connect!? Any thoughts?
Bugzilla: MySQL Returns "Got Error 127..."
Our bugzilla database started giving this error during last week sometime. "Got error 127 from table handle". I Googled it, and came to believe that "repairing" and "optimizing" the table should sort out my problem, only to be shocked to see that over 10 000 records have been deleted by the repair/optimise. You see, this is not an option. We have over 18 000 bugs logged on our system, and as an organising our size, we need to comply to certain SAS70 requirements. Losing 10 000 records on our bugs database will fail the entire organisation the SAS70 reward, and guess what... it's on my plate, and if I can't do anything about it... people will talk bad about me for long after I've left the company. I understand that the table records has gone corrupt. How it went corrupt I don't know and why it was working fine with over 10 000 corrputed records for the last 2 years, I also don't know. But right now it's not my job to understand it... I need to fix it, and keep every record in tact. I've done a restore of the data all the way back to the day just before it crashed. When I ran a repair and optimize then, it did the same thing... over 10 000 records dissapear. PLEASE HELP. I am despirate!
Pad ID Column With Leading Zeros (was "How To Do This In Mysql?")
in MS SQL 2000 I have a testing table in this table : [ID] [int] IDENTITY (1, 1) NOT NULL and i think all tables have this column so table Testing like this ------ ID ----- 1 2 3 4 5 .... 10 11 .... 100 101 ----- so i want a sql query for retrieving Item Code which is the ID in the comming format : -------- ItemCode -------- 00001 00002 00003 00004 00005 ... 00010 00011 .... 00100 00101 .... ------ and i make a query: SELECT Replicate(Ɔ',5-DataLength(convert(varchar,ID)))+''+Convert(varchar,ID) As ItemCode FROM Testing this query is working fine but i think that if the value of DataLength(convert(varchar,ID)) is more than 5 then the ItemCode is Null And the major problem is how to convert this sql query into mysql query?
"Illegal Mix Of Collations" MySQL Error
What I am attempting to do with an SQL query is grab data from multiple tables for outputting to an Excel spreadsheet file using PHP. Each row should show details for each member, as queried from multiple tables (using the field 'PersonalID' as the primary/foreign key). The query I have is as follows: SELECT tblcoreuser.PersonalID, tblcoreuser.usrForename AS Forename, tblcoreuser.usrSurname AS Surname, tblcoreuser.voucher AS Free_Status, tblcoreuser.Joined AS Date_Joined, tblcoreuser.Package AS Membership_Package, tbladdress.Address1, tbladdress.Address2, tbladdress.County, tbladdress.Postcode, tblcredits.numCredits AS Remaining_Credits FROM tblcoreuser, tbladdress, tblcredits WHERE tblcoreuser.PersonalID = tbladdress.PersonalID AND tblcoreuser.PersonalID = tblcredits.PersonalID ORDER BY tblcoreuser.PersonalID DESC; The error being returned is: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '=' I've tried removing certain parts of the query, but cannot seem to pinpoint the exact cause of the problem. I'm sure I'm missing something simple -
I Get "Can't Connect To MySQL Server 'name' 10061" (sometimes)
We have a system that runs php5 and MySql 4.1. The apache and mysql servers are on the same in-house network but on different boxes. If a number of users invoke a page which has multiple queries that access a DB table of about 1 million rows of about 40 times, then the user gets "Can't connect to MySQL server 'name' 10061. This happen very irregularly. The server chokes and a few seconds later comes back to life. I searched for this and got a lot of hits where users don’t have a connection at all. This is not the case. - We have a SonicWall firewall, could the firewall think that it’s an attack on a port, when that many connections are coming? - I also checked dev.mysql.com and got a lot of info on 10061, but it’s only those users who can't connect at all.
Intermittent "Can't Connect To MySQL Server"
Recently, I started getting small periods of intermittent connection errors about once every hour, lasting for about 1 to 5 minutes each time: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' I enabled the error log and did some other monitoring and established 2 things: - the server doesn't crash/restart, it keeps running throughout the errors - the errors do not match the load on the website, as sometimes when 500 users are online there are no errors, but when 300 are online they may by prolific I checked many forums and then made 5 changes: - changed the directory containing the mysql.sock file so only file owners or superusers can delete files from it - I changed the default socket file setting in both my.cnf and php.ini - I read about SELinux causing such a problem, so I disabled SELinux completely, rebooted the server and double-checked that it is indeed disabled. - I changed the maximum amount of open files allowed by the operating system from 1024 to 30000. Despite all these changes, I still get the errors. I then read that there is a workaround by using TCP/IP instead of the sock file. I tried that, but I still get the error intermittently in the form of: Can't connect to MySQL server on 127.0.0.1 This is a extremely frustrating problem, it's been bugging us for weeks, anyone who can offer some help - it will be greatly appreciated! MySQL server 4.1.20, PHP 4.3.9, client API 4.1.20, CentOS 4.3, Intel P4 2.8GHz 1GB RAM
What Does CREATE TABLE Phpbb_anti_robotic_reg Mean? (was "Mysql Help")
Hey im trying to install a hack onto my forum, which isnt really the important part. Ive done the steps until i come to the MYSQL part which reads the following: Quote: CREATE TABLE phpbb_anti_robotic_reg ( session_id char(32) DEFAULT '' NOT NULL, reg_key char(5) NOT NULL, timestamp int(11) unsigned NOT NULL, PRIMARY KEY (session_id));
Why Did INSERT DELAYED Get An Error? (was "Mysql Help!")
I have a mysql databae that gets pounded with INSERTs to basically an address book. 1) Is this high: Server traffic: These tables show the network traffic statistics of this MySQL server since its startup. Traffic ø per hour Received 37,793 KB 2,581 KB Sent 1,128 MB 78,912 KB Total 1,165 MB 81,493 KB Connections ø per hour % Failed attempts 6 0.41 0.01 % Aborted 0 0.00 0.00 % Total 71,281 4,867.81 100.00 %
"Too Many Connection Errors" MySQL Status
I have cases where I connect to the web site and MySQL is not working : Message : "Too many connection errors", Unblock with 'mysqladmin flush-hosts'. What I did is a script that check out /etc/init.d/mysqld status and if is not running, then, I restart MySQL. If you accept my Question : [color=blue][color=green][color=darkred] >>> What is the status of MySQL when there is the message "Too many[/color][/color][/color] connection errors", Is it Stopped or Running ? .. Could we think of something better than restart MySQL using an auto- 'mysqladmin flush-hosts'.
Can You "Return Rows" In MySQL Administrator?
I'm use to using SQL's Enterprise Manager for going into my DB and making changes. One of the things I like to do is view all the information in a specific table (return all rows). Can this be done with MySQL administrator 1.1.4? I can see the tables listed, but for some reason, I can't access the information within the tables.
New Member "HELLO" : Couple Of MYSQL Questions.
I'VE JUST DISCOVERED TEKTIPS SO HOPEFULLY SOME OF YOU GUYS CAN HELP WITH THIS. I have 2 problems i'm trying to solve. 1. How to select a random picture from each group of pictures but not repeat the group. I have 2 tables - Pictures : contains Id, Thumb (link to the picture location, Exclude, GroupNameId - GroupName, contains Id, Group, Exclude, newgroup (to show a NEW pic) The current query is : SELECT groupname.Group, pictures.Thumb, groupname.ID, groupname.newgroup FROM rascal.pictures, rascal.groupname WHERE pictures.Exclude=0 AND groupname.exclude=0 AND pictures.groupnameid = groupname.id and Thumb <> '' ORDER BY RAND() This brings back random pictures but sometimes (almost always) the groups are duplicated. I'd like something to only bring back one random picture per group. I tried this select * from rascal.pictures a JOIN rascal.GroupName b on a.groupnameid=b.id Where a.exclude <> 1 and Thumb<>"" Group by b.id order by Rand() but this brings back the same picture in each group each time, which is not what i want. Does anyone have any idea how to acheive this is MYSQL ? 2. UK Number One Hits. I've decided in my wisdom that it would be quite cool to be able to tell someone what was number on the day they were born (by entering a date) ... easy peazy, but I want to also display what was number one on each birthday until the present day. The file contains the date the record became number one NOT each date for every year. To get the birth date would be something like SELECT * from numberones where numberonedate < xdate ORDER by numberonedate DESC LIMIT 1 but how would I return each seperate year into an ASP page and display it
|