MySQL version 5.0 - please also tag with mysql for search purposes.

learn more… | top users | synonyms

21
votes
6answers
5k views

DELETE command not completing on 30,000,000 row table

I have inherited a database and am looking to clean and speed it up. I have a table that contains 30,000,000 rows, many of which are junk data made by an error by our programmer. Before I add any new, ...
4
votes
1answer
58 views

“TRUNCATE doesn't run ON DELETE trigger” true or false

I was searching on the topic of why TRUNCATE is placed in DDL instead of DML for which I found following answer here Why is truncate DDL? I this answer I found a sentence as given below "The fact ...
4
votes
1answer
5k views

Allocating 8GB memory to MySQL on a 64bit system

Specs - MySQL 5.0.x , Redhat 5.9 , Physical memory - 16GB I am trying to set innodb buffer pool size to 8GB (innodb_buffer_pool_size=8G). When i do, and start mysql, i get following error - ...
3
votes
2answers
10k views

How do I fix the definer problem The user specified as a definer ('fred'@'192.168.0.%') does not exist

I dumped an existing database from my web site into a new MySQL setup on my laptop. Everything works except pages that use a view, when the error message above appears. There is only one view on the ...
2
votes
1answer
2k views

Load different date formats in mysql

I have a date field in my datafile which I am trying to load in MySQL, but the date field is in dd-mon-yy format and MySQL only understands YYYY-MM-DD. Is there a way by which I can load DD-MON-YY ...
2
votes
3answers
5k views

Automatic MySQL Replication Fail-over Strategy

I want to know that if replication is down due to some reason as if master is down then what strategy should be followed so that the replication is up instantly without manually intervening the ...
2
votes
1answer
1k views

Can't create/write to file MySQL

Server Configuration: MySQL 5.051a-community-nt-log Community Edition installed on Windows Server 2003 Standard Edition SP1. This MySQL Server is part of a client's WAMP installation Problem: ...
2
votes
1answer
90 views

Opening MySQL connection is sometimes very slow

I have a very weird issue with an older MySQL server (v5.0.45) and a Java application. From time to time getting a connection from the database takes 7 seconds, 15 seconds, 30 seconds etc (most of ...
1
vote
1answer
83 views

Calculating percentage of count and adding it to the count in MySQL table with the query [closed]

I have following basic MySQL query and I my aim is to artificially inflate the amount of today's orders by 75%. Is there a more efficient way of doing this without using COUNT twice? SELECT ...
1
vote
3answers
102 views

What indexes should one use for this two-table setup?

I have the following two-table setup: CREATE TABLE relationships ( id bigint(20) NOT NULL AUTO_INCREMENT, type varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (id), ...
1
vote
1answer
1k views

Can I remove #sql_ .MYD files?

I found some old files in the mysql datadir: -rw-rw---- 1 mysql mysql 0 2012-10-09 09:39 #sql_263c_0.MYD -rw-rw---- 1 mysql mysql 1.0K 2012-10-09 09:39 #sql_263c_0.MYI -rw-rw---- 1 mysql ...
1
vote
2answers
25 views

Can I remove binary log files not listed in mysql-bin.index?

We've had some problems with one of our more elderly MySQL servers (version 5.045). The database is back up and running OK but there were over twenty thousand binary log files in the mysql folder. I ...
1
vote
1answer
191 views

Cannot delete MySQL trigger. Appears in information_schema, but no .TRN file

I have a MySQL database with a few tables and triggers. A process was trying to drop one of the triggers and it failed with the following error: Malformed file type header in file 'trigger_name.TRN' ...
1
vote
1answer
171 views

How to create a second socket for mysqld

I would like to create second mysqld instance. How can I create a second socket file? I tried copying /var/run/mysqld/mysqld.sock and create an empty file mysqld2.sock but no luck.
1
vote
1answer
1k views

MySQL replication — issue with mysql.proc during replication from 5.0 to 5.5 host

We are replicating from a mysql 5.0.45 host to a 5.5.26 host over WAN. Every once in a while one of our databases does not accept a query and halts the replication. "'Column count of mysql.proc is ...
1
vote
1answer
2k views

How to know the current log sequence number in 5.0.X

I would like to test the optimal value for iblog files on my mysql which is 5.0.77 I found the below procedure in mysqlperformance blog: ...
1
vote
1answer
70 views

Trying to combine one row from one table with mulitple rows from another table but not sure if I'm doing it right?

The Situation I have two tables unit and unit_translations defined as: CREATE TABLE `unit` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255) NOT NULL COMMENT 'Title of unit', ...
1
vote
0answers
176 views

invalidating query cache entries(key) [duplicate]

when I tried to delete some records from a MYSQL server (version 5.0.95-log) and checked the process list I got the result as follows mysql> show processlist \G *************************** 2. ...
0
votes
1answer
2k views

Moving MySQL Cold Backup to Another DB Server

I am new to MySQL and want to know the info whether taking a cold backup from source and copying it onto new server with same version require any additional configurations settings to be changed. As ...
0
votes
1answer
117 views

Cross Join and Left Join within a query

I have query which has a cross join and also a left join which produces an error Unknown column 'a.hour' in 'on clause' simplified version of query is like this SELECT b.*,a.hour,c.datetime FROM ...
0
votes
2answers
2k views

Steps to upgrade MySQL from version 5.0 to version 5.5

I have been developing under MySQL v5.0 for a while now and need to upgrade to v5.5 to be in step with the hosted production server. After having searched for precise steps to do this migration, I am ...
0
votes
1answer
39 views

Upgrading to MySQL 5.5 from 5.0 looks broken

I was using SLES SP3, and had earlier MySQL 5.0.67. I upgraded it to 5.5.48 (available with the CD) after upgrading my OS to SP4. I edited the /etc/my.cnf file, and replaced skip-locking to ...
0
votes
2answers
33 views

Replication Setup what's the value of MySQL auto_increment and offset in my.ini

I have setup master master MySQL replication to sync changes in both servers. Now I want to setup 6 servers, is that possible? I'm making 6 because when an area lost it connection over WAN it will ...
0
votes
1answer
339 views

Audit DML operations on MySQL Tables

We have several MySQL 5.0 databases. We've been having security problems, like records being modified without authorization. We need to implement some kind of audit on DML operations identifying ...
0
votes
1answer
353 views

MySQL Table rename and Grants

We are in the process of spring-cleaning our production MySQL 5.0 database, and this includes the renaming a number of tables. We are using the following syntax for the rename ALTER TABLE ...
0
votes
0answers
38 views

MySQL output out of order

I have a bash script which read locks all tables of two databases of a MySQL server, which have the same structures, flush the database and rsync the MYI, MYD and FRM files from one of the locked ...
0
votes
1answer
112 views

MySQL database dump bombs out Error 1064 when using LOCK TABLES

This specific machine is running MySQL version 5.0.27. I have tried to get a full dump of this database several times and each time it bombs out. Tried getting just a structure dump of it and this is ...
0
votes
2answers
162 views

Large query with subquery runs indefinitely after mysql update

We recently did a big server update, in the process migrating from mysql-5.0 to 5.5.40 Several of the queries, which had been running well on the old server, now grind everything to a screeching halt. ...
0
votes
0answers
114 views

Enable general_log in Mysql 5.0.96

I want to enable general_log in MySql 5.0.96. I have set log variable but it isn't working. [mysqld] log=/var/log/mysql.log and restart mysql with following command /etc/init.d/mysql restart But ...
0
votes
0answers
154 views

CREATE VIEW joining two tables, only displaying rows from the first table with the most recent date in the second table

I have multiple tables. My main table has a composite key consisting of a phone number and an order number. I want to create a VIEW where only the subscriptions with the most recent order date are ...
0
votes
1answer
228 views

Slow queries with many self joins in variable-column database

I'm creating a table structure which needs to handle a variable number of columns. To handle that case the table structure is a listing of cells with a column and row number. To view the table a ...