Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. vanekl

    synchronizing two Mysql databases

    this will work, provided you use natural keys instead of autoincrement keys: http://www.phpbuilder.com/columns/tanoviceanu20000912.php3?page=1
  2. vanekl

    MySQL won't start anymore

    go to the c:\mysql\data\mysql directory and run, c:\mysql\bin\myisamchk -e *.MYI > report.txt and look through the report.txt file for errors. Then run, myisamchk -r <tablename> on any table the report says has an error. If that doesn't work, just reinstall MySQL.
  3. vanekl

    select data from within the last 28 days

    you could try this, SELECT * FROM yourtable WHERE yourdatefield > DATE_SUB( Now(), INTERVAL 28 DAY);
  4. vanekl

    setting max_allowed_packet

    You have to restart the server for the changes in the .ini file to take affect. Note that both the client and the server has it's own max_allowed_packet variable. If you want to handle big packets, you have to increase this variable both in the client and in the server. If both the client and...
  5. vanekl

    Size on harddrive of certain tables

    To get the average row size do a, show table status;
  6. vanekl

    renaming table in database, restoring data to table

    To rename a table: alter table product rename os-product; To create a table based on your 'live' table: create table product select * from yourlivedatabase.product; [This assumes both databases are located on the same machine.]
  7. vanekl

    How do I start MySQL without InnoDB?

    Three host.{frm|MYD|MYI} files are installed in MySQL's data\mysql directory upon MySQL installation. Did you accidently delete these files, or delete the data\mysql directory, or delete the mysql database? Just reinstall MySQL to reinstall these files. You can get MySQL to not use InnoDB...
  8. vanekl

    calculating date values

    SELECT sec_to_time(sum(time_to_sec(yourfield))) FROM yourtable WHERE yourdatefield >= DATE_SUB(CURDATE(), INTERVAL 7 DAY));
  9. vanekl

    passing sql statements to os

    Put your SQL statements in a text file and redirect them to MySQL: mysql --user=root --password=rootpass DBName < yoursqlfile.sql
  10. vanekl

    number of active connections?

    do a, show status; and look for 'threads_connected.'
  11. vanekl

    MySQL Search abilities

    Version 4.0.1+ has full-text search capabilities that you allude to. mysql> SELECT * FROM atable WHERE MATCH (field1,field2) -> AGAINST ('+term1 +term2 -term3' IN BOOLEAN MODE); This capability is only provided for the MyISAM table type. There are no versions of MySQL, AFAIK, that...
  12. vanekl

    Another Slow Query/ Indexing Problem

    There is a definitive WHERE clause: t.topic_moved_id =0 MySQL will key in on this clause because it is a constant. The only problem is, I'm betting there are tons of 0's in this column, so the index is being ignored (see below). Have you done an 'ANALYZE TABLE nuke_bbposts, nuke_bbtopics'...
  13. vanekl

    Can Anyone Help With This Slow Query?

    Glad to hear you worked it out. Your key_buffer_size is too small for a machine that has 512MB. Should be at least 100M instead of 16M. This should be set in your my.ini/my.cnf file and the server restarted. set-variable = key_buffer_size=100M This setting will allow MySQL to store more...
  14. vanekl

    Can Anyone Help With This Slow Query?

    Have you run 'EXPLAIN' on this SELECT query? You may want to post the results of the EXPLAIN if it isn't clear. You are creating two indexes on attach_id in the nuke_*_desc table. Should delete the second index (KEY `attach_id`). Have you tuned the server parameters? Can you change any of...
  15. vanekl

    MySQL Command Center Query Failing

    Your INSERT looks good except for the word 'values.' Delete it and the query should work.
  16. vanekl

    Count, based on a select.

    To create a temporary table that is automatically deleted when the database connection is closed: CREATE TEMPORARY TABLE tbl_name AS SELECT blah blah blah...
  17. vanekl

    Create a view AS....?

    If you just change 'CREATE VIEW...' to 'CREATE TABLE...' your statement will work.
  18. vanekl

    Selecting where first char is a number

    SELECT * FROM yourtable WHERE afield REGEXP &quot;^[0-9]&quot;;
  19. vanekl

    Emergency!!!! MySQL just stopped working!!

    I've been upgrading from version 4.0.12 through 4.0.17 without any problems. I always overwrite the existing version (except I rename the bin directory). I think there would be problems, however, if I upgraded to the alpha version 4.1.1, so I haven't done that.
  20. vanekl

    Emergency!!!! MySQL just stopped working!!

    Yeah, you can install over a pre-existing installation as long as MySQL is not running. I would recommend, however, that you rename the bin directory to something like 'bin_old' so the MySQL installation program creates a completely new bin directory.

Part and Inventory Search

Back
Top