MySQL : Open-Source, Relational Database Management System
0
votes
1answer
21 views
Proper names for SUM(col) fields
I have worked on MySQL databases for a long time, but one question I have never been able to get an answer to that seemed formal is: In the query SELECT *, SUM(col1) FROM tbl, what is the proper name ...
0
votes
1answer
83 views
mysqldump: Got error: 1017: Can't find file: 'drupal_install_test' (errno: 2) when using LOCK TABLES
I'm trying to backup a drupal site database but I'm having some issues. When I ran the following command:
mysqldump -uroot -p drupaSite > drupaSite.sql
I get the following error:
mysqldump: Got ...
0
votes
2answers
24 views
A query for a latest version of data
MySQL.
Let there is a table with fields startdate and kind.
Actually in the real problem column named here startdate and kind are in a UNIQUE index, but the case if only startdate (not kind) is ...
0
votes
2answers
61 views
Cannot Utilize Maximum CPU and Memory Usage for MySQL
Good day.
I know this may be a duplicate of other questions however I have applied all the suggestions in many of the threads, but I remain with the same problem.
I have a single stored procedure ...
0
votes
0answers
33 views
How Can I do and INNER JOIN USING (2 columns)?
Suppose we have:
CREATE TABLE cscart_products_prices_temp LIKE cscart_products_prices;
ALTER TABLE `cscart_products_prices_temp`
DROP `percentage_discount`,
DROP `lower_limit`,
LOAD DATA LOCAL ...
5
votes
1answer
97 views
Start/Stop MySQL
I'm seeking help to understand what happens when the following command line is executed:
root@prodn$ service mysqld stop
Yes, it shuts down the MySQL server so access to it is no longer available ...
0
votes
0answers
56 views
Converting data from MSSQL Server to MySQL using MySQL Workbench and preserving special characters
I am trying to convert a MSSQL Server database with collation SQL_Latin1_General_CP1_CI_AS into a MySQL database using MySQL Workbench. I can successfully complete the process without any issues being ...
0
votes
1answer
20 views
Simple query not using indexes
My query is not using indexes.
It is a simple query.
Can someone explain why that's the case?
The query:
select TIME_FORMAT(start_time,'%H:%i') start_time,
TIME_FORMAT(end_time,'%H:%i') ...
3
votes
1answer
32 views
Is it possible to select internal InnoDB columns?
I have read that InnoDB uses a few fields internally for all rows, such as the hidden columns DB_TRX_ID and DB_ROW_ID. Is there any easy way to see these values, such as within a select statement?
0
votes
1answer
54 views
Why would SequelPro only import 23k rows out of 130k?
I use SequelPro for mysql on a Mac OS X -- and I used the import function to upload a 130k .csv file to my database. Everything seems to work fine, then I get the message File Read Error: An error ...
0
votes
1answer
57 views
Why some of mysql system variables are readonly
There are almost more or less 277 mysql server system variables .
In these variables some of the variables are dynamic and few are not.
I don't under stand what is the reason behind read only ...
1
vote
1answer
33 views
High IO when switched to InnoDB
We have query that worked well in MyISAM. When we switched to InnoDB, the writes I/O raised up to 50 times.
The query is type of INSERT ... ON DUPLICATE KEY UPDATE
I don't know if the problem is ...
1
vote
1answer
50 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 ...
0
votes
1answer
35 views
MySQL server crashed.
Help! I managed to crash MySQL last night. I am on a Mac using the native version that came with Mountain Lion. I was upgrading from 5.5 to 5.6. I have followed instructions in this forum to delete ...
1
vote
1answer
56 views
mysql ibdata1 file corrupted or increased unusually
We are using MySQL 5.2 version all InnoDB tables.
I have observed that ibdata1 file got increased very unusually like occupied 500 GB in 2 days.
In last 6 months, it had taken only 6 GB though ...
2
votes
1answer
88 views
/usr/libexec/mysqld: Normal shutdown, but my team doesn't do that?
One of my databases has been shutting down abnormally, but the log said "normal":
130422 13:23:01 [Note] /usr/libexec/mysqld: Normal shutdown
130422 13:23:01 [Note] Event Scheduler: Killing the ...
1
vote
2answers
60 views
Restoring a database backup to a local machine in MySQL
I have downloaded my .sql file of my database server. It is in the D: drive of my Windows machine.
I want to restore the back up in my this machine. I used:
mysql database -u root < ...
7
votes
4answers
462 views
How to create a database for unknown kinds of data?
I am in the process of designing a database for a new PHP/MySql-based application.
My problem is that I do not and cannot represent what should be saved in the database because it is unlimited and ...
3
votes
1answer
108 views
Simple MySQL query randomly takes forever
I'm having an issue on my server with a simple PHP send emails script that runs every minute via a cronjob. The script contains a MySQL query that runs very fast most of the time, but randomly will ...
1
vote
2answers
71 views
Is there a way to stop MySQL Replication on the master?
I want the master to stop replicating data to the slave. I know I can do that on the slave with STOP SLAVE;, but I wonder if there is a way to do it in the master.
One possible solution might be to ...
1
vote
1answer
61 views
Is there a way to recover this database (MySQL)
I did a "cold" (db offline, all filesystem files) backup of a MySQL db.
I wrote the backup to an ISO image. Unfortunately Joliet filenames are not default.
I didn't realize that until attempting to ...
1
vote
3answers
104 views
Help with modeling this table
Thanks for reading my post...I'm new at setting up databases and am working on a simple practice app.
I have a table called PhoneNumbers, which hold a list of phone numbers (duh). I have two other ...
0
votes
2answers
78 views
High Mysql Load , over 700% CPU
I had high mysql load on server linux 64 bit , 24 G.B ram , Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz ,
Alot of quiers in sending data mode
Here is mysql status
...
0
votes
1answer
51 views
How do I stop a query from running if the row is locked?
I have a section of code that locks the database, updates it and then confirms.
This is all working fine, if another user attempts to update the same row they cannot and their changes are discarded.
...
0
votes
0answers
99 views
Unable to import exported Wordpress DB - #2006 - MySQL server has gone away
I'm having a nightmare trying to clone a live Wordpress site into a local dev environment using MAMP Pro and BackupBuddy.
I have no problem with setup. The problem is that there seems to be some ...
1
vote
1answer
56 views
Tool to export data with all relational data?
Is there a tool to export data from selected rows in a table with all data stored in other tables in other tables linked by relational design?
The purpose is to ease migrations of bits of data ...
2
votes
1answer
39 views
MySQL Full Text search increase relevance for exact matches?
I have a MySQL database of ~10,000 organisation names that I want to be able to search. I would like to use a full text search because this would enable me to find "institute of doobry" by searching ...
2
votes
1answer
67 views
Replacing a PHP loop with a MySQL Query
I have a MySQL database table where I store a user_id and a hash each time someone logs in. The hash is stored in a persistant cookie so it doesn't change as users log in and out of the site.
The ...
-1
votes
0answers
44 views
How to join value of two tables [closed]
I want join two tables value. here is my table structure:
table 1
----|--------
id | p_value
1 | 2000
2 | 3000
3 | 4000
4 | 5000
------------
table 2
----|--------
id | pro_value
1 | ...
0
votes
0answers
23 views
ERROR while doing coalesce partition Mysql Cluster
My table contains 3299000 rows. My Mysql Cluster contains 2 storage nodes with NoOfReplicas=2. By default it contains 2 partitions and after that i added 3 partitions more one by one using command ...
2
votes
1answer
87 views
MYSQL score by rank
I am using MYSQL to create a rating system to implement my database. What I want to do is to rate each attribute by its percentage. Here is the example database:
ID, value
1, 3
2, 5
3, 2
4, 5
The ...
5
votes
1answer
263 views
MySQL hogging memory
An installation of MySQL 5.6.10 on a virtualized Ubuntu 12.04 is exhibiting massive memory hogging. The mysqld process claims the entire available memory within a couple of hours of uptime and forces ...
1
vote
1answer
52 views
Equivalent of MRG_MYISAM in databases other than MySQL? [closed]
Does anyone know if other database have something equivalent to MRG_MYISAM (aka the MERGE table type/storage engine)?
I know about fragmenting, but this is not quite the same AFAIK. We're using ...
1
vote
1answer
41 views
MySQL: logging queries which would execute without using indexes
I am trying to use log_queries_not_using_indexes = 1 to find queries which are not executing optimally on a MySQL server. However, I find the resulting log file of rather limited value. Apparently, ...
2
votes
1answer
73 views
mysql: need help to optimize my query/table
I'm wondering if someone could help me optimize my tables/query to speed up a query. It is currently running ridiculously slow. I think a well-thought out index could help me. Any help would be really ...
1
vote
2answers
77 views
Loading data in mysql using LOAD DATA INFILE, replication safe?
I am trying to load data into mysql database form CSV file. I found that we could use LOAD DATA INFILE command to do it. But as per the mysql documentation it is not replication safe. (See here)
Is ...
2
votes
1answer
76 views
MySQL Tables Require Daily Repairs - Server, Table or HD?
I've been experiencing a weird issue with one of MySQL DBs. Every day, sometimes 2-3 times per day, I'll need to repair the tables. The MySQL DB has 25 tables with 5.6m rows in total.
The bigger ones ...
0
votes
1answer
33 views
Reinstall MySql but keep database tables and data
Please help!
There are server issues and MySql is no longer running on our server (Ubuntu). The service is not recognized and needs to be reinstalled. Unfortunately, the database has not been ...
0
votes
1answer
32 views
Need ideas about OPTIMIZE TABLE
Looking at a database with 10 tables and fairly active at by-the-hour changes. On the first of each month, I purge some rows from 3 tables to remove outdated material and keep the size down. All of ...
0
votes
2answers
64 views
Need Permissions Granted: INTO OUTFILE for Mac OS X [closed]
Sorry for potential duplicate questioning, because I've seen this asked many times (notably from Mac users) -- but none of the answers seemed to help me.
I'm using Mac OS X with Sequel Pro (or I can ...
0
votes
3answers
83 views
Single slave - multiple master MySQL replication
I need to replicate different MySQL databases from multiple servers into a single slave server. How can this be done? is there a way to define multiple master hosts?
0
votes
2answers
63 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 ...
4
votes
2answers
57 views
MySql master and slave design
I have set up mysql replication with single slave.
Whenever i am adding data to master database, it is automatically copied to slave database.
But if I add data to slave database it is not available ...
0
votes
1answer
22 views
replication breaks after upgrading master
I have a set up of replication with master 5.1.30 and slave 5.5.16
and the replication is working good
Now i have upgraded mysql master to 5.1.47
As far as i know we have to turn off the log bin ...
0
votes
0answers
38 views
RDS MySQL instance swapping lots of temp tables
I have an application that has few concurrent connections but does a lot of uncacheable fulltext searches sorting, limit with offset, etc. I have an xlarge instance with innodb buffer pool size @ 75% ...
2
votes
1answer
24 views
The client need 'SUPER' privileges to the reports DB in order to create and maintain my Functions
I have problem with one of my client
Provided super privileges to the client James on 'Reports ' database , but the problem is the client need 'SUPER' privileges to the reports DB in order to ...
1
vote
4answers
90 views
Unsure how to implement certain constraints and relations in this relational database schema
I am in the middle of designing the dB for school project- airline ticketing database.(Using MySQL workbench)
So far, I came up with the following design:
Here are couple things I can't figure out: ...
0
votes
0answers
14 views
MySQL shared server regular lockup
I have a web/ database server with 5 websites on it, all of which execute fairly complex queries regularly.
Some of these queries appear in the slow log and take around 0.6-0.8 seconds. However I ...
0
votes
1answer
32 views
How should I set up these tables in my relational database?
I'm working on a project where a person can create a survey with custom questions and display the questions in whatever order they choose. They can break the questions into sections. The problem I'm ...
1
vote
0answers
61 views
How can I join one to one to (many to one) without using group_concat
I have a table structure as follows:
--
-- Table structure for table `emails`
--
CREATE TABLE IF NOT EXISTS `emails` (
`ID` int(5) NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE ...

