Tagged Questions

MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
11 views

Select products and include all cities it belong to

I have 2 tables : PRODUCTS +----------+----------+----------+----------+ | id | title | content | city | +----------+----------+----------+----------+ CITIES +----------+----------+ | ...
1
vote
1answer
51 views

How to achieve a many to many relationship in this database design?

I am currently working on small travel application in which users can add other users' trips in their wishlist. I am facing difficulty in designing database for wishlist. What I have tried so far is: ...
1
vote
1answer
20 views

is there some way to give me the order in which inserts should be made so all FK constraint are met?

I have a mysql 5.6 schema with about 60 tables. I need to write some code (not sure if it will be Sql or java) to populate the data. The schema has lots of FK etc. Is there some good way (I am ...
0
votes
0answers
7 views

Improve processing of data and structure design from flat file to CMS DB (using intermediate DB)

I have a flat file (CSV) that brings me the data I want, but it needs to be cleaned and processed before it can be used, so I built an intermediate Database (MySQL) in order to get the structure from ...
1
vote
2answers
38 views

SELECT in federated table is to slow

When i test select * from myFederatedTable (for test there is 50k rows) it take 0.3732 seconds now I have two federated tables with data < 20000 in both tables, and have query like : SELECT ...
0
votes
1answer
11 views

Where to put my.ini file for 5.6.21 MySQL Community Server on Windows

I have copied the C:\Program Files\MySQL\MySQL Server 5.6\my-default.ini to C:\Program Files\MySQL\MySQL Server 5.6\my.ini and changed some settings including setting table_definition_cache=400. When ...
0
votes
1answer
17 views

Query perfomance with multiple JOINs on MyISAM-based DB

I'm working with Enron Email Dataset in MySQL database. After I executed data import from dump-file into MyISAM-based DB, I got the set of tables without any connections between them via foreign keys. ...
0
votes
1answer
18 views

MySQL UDF - wrong ELF class: ELFCLASS32

I'm having a problem creating a MySQL udf on my server (I was able to do it locally on OS X). I am compiling it like this on the server: gcc $(mysql_config --cflags) -I /usr/include/mysql -I. -shared ...
1
vote
1answer
20 views

Most efficient way to cascade delete in MySQL

I have several 1-to-many FK relationships in my MySQL schema, with tables as follows: AGENCYS 1-*> ROUTES 1-*> TRIPS 1-*> STOPTIMES At present, there are roughly 1300 agencys, 16000 ...
0
votes
1answer
15 views

How can i make dump of big mysql table?

I have server with db(36Gb data), only mysql access. When i'm trying to use mysqldump utility, i get connection timeout(or something like this). I doesn't have ssh access for copy /var/mysql/data. ...
0
votes
2answers
50 views

Need help about normalizing database to 3NF

I am currently working on a city travel guide application which let users explore places and plan trip. In the account module, the following functions are to be considered: User can register by ...
0
votes
1answer
8 views

Running identical queries in sysbench

When benchmarking using sysbench and utilizing concurrency (multiple threads) for example on a table with 1,000,000 records, does sysbench run "identical" queries in a loop on the table?
0
votes
1answer
19 views

Achievement Table [on hold]

I have a table with the offers and I need to relate this table to some requiremnts to get such an offer. For example let's say the offer say 50% of discount on the ticket if you buy 3 cokes and come ...
0
votes
0answers
23 views

Does a search based on a set of strings impact performance in MySQL?

I am designing a table of products for a web-based e-commerce application. In order to display SEO friendly URLs on the site, I am using a table of unique links to look up the actual product ...
0
votes
3answers
31 views

How do I unit test queries which are based on dates from now?

I've had a hard time making unit test for most of my queries because they are tied very closely to current dates and data which is added to the database could modify the result of the unit test. For ...
0
votes
1answer
19 views

Which foreign keys do I use if they are repeated

I have the following two tables company_relationships |ID|Company_ID|Affiliate_ID|<Relationship Info>| +--+----------+------------+-------------------+ jobs |ID|Company_ID|<Job Info>| ...
0
votes
1answer
13 views

Import csv data from localhost emacs SQLi error MySQL

I'm trying to import LOAD DATA LOCAL INFILE "/home/frederic/cowtest.csv" INTO TABLE cow_db1 FIELDS TERMINATED BY "," ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (state_abb, ...
0
votes
2answers
42 views

mysql innodb_buffer_pool_size let me understand

I couldn't find answer for my situation. I have a windows server 2008 with 2 cores and 7 GB RAM (Azure D1 VM). I'm running mariadb 10.0.14 on it. I have 2 databases (1.5GB and 9GB in size). ...
0
votes
0answers
37 views

NEED HELP - DESIGNING DATABASE FOR DONATED SYSTEM [on hold]

I want to make a website for donate. => This is my first time to build a database so please help me... User (table is for account for administrator) daftardonasi (list for donation) ...
0
votes
0answers
21 views

Entity Schema Design

I'm working on an application that has an "entities" system (built before my time) that models users, customers, contractors, vendors, etc. These are all types of people, but have different needs in ...
0
votes
1answer
44 views

Determine if queries have small or large results

In the MySQL documentation for Query cache, specifically on the topic of query_cache_min_res_unit "If you have a lot of queries with small results, the default block size may lead to memory ...
0
votes
0answers
10 views

Getting Error During install_master_slave in Tungsten Replicator

Master Node:- 192.168.126.138 TNGSTN_RPL1 Slave Node:- 192.168.126.139 TNGSTN_RPL2 On Master Node:- [root@TNGSTN_RPL1 tungsten-replicator-2.1.1-25]# cat /etc/hosts 127.0.0.1 localhost ...
0
votes
1answer
30 views

Hyperthreading & MySQL InnoDB Thread Concurrency Performance

I have a dedicated DB Server with the following specs" Ubuntu 12.04 LTS Server Intel(R) Xeon(R) CPU X5670 @ 2.93GHz 12 Cores MySQL 5.5.29 64 GB RAM RAID10 We are currently doing Hyperthreading ...
0
votes
0answers
46 views

Testing a MySQL index without data [on hold]

The execution plan of MySQL seems to vary quite a bit based on the amount of data in the indexed tables. This seems to make it quite difficult to validate that a new index will indeed alleviate a ...
-1
votes
0answers
23 views

inserting information into database tables created using wamp server [on hold]

I am doing an online registration system for students. I have created a database named "library" and database tables using phpMyAdmin on my wamp server. My question is: How do I insert information ...
0
votes
1answer
31 views

TYPE_SYM syntax error when running the mysql command to create or replace type

Here is my command: CREATE or REPLACE TYPE DRIVINGSCHED_TYPE AS OBJECT ( vehicle VARCHAR2(20), datesched DATE, starttime DATE, endtime DATE ); ERROR: Line 1: syntax error, unexpected TYPE_SYM, ...
0
votes
0answers
20 views

Can't install sample MySQL employees DB

I'm unable to install sample MySQL employees DB. I'm on OS X 10.10 with MAMP Pro(3.0.7.2). When I try to install it, I get the following errors. [ERROR in query 15] You have an error in your SQL ...
0
votes
0answers
13 views

MySQL - Pending flush list, aio write, and the innodb_use_native_aio parameter

I'm running an Amazon RDS instance with MySQL 5.5. The applications using that are very write intensive, and there's over 1TB of data. Everything was fine until a recent minor version upgrade and ...
0
votes
2answers
56 views

SQL - Cannot Add Foreign Key Constraint

Can anyone tell me why there are errors such as : Cannot Add Foreign Key Constraint And am i on the right track ? DROP DATABASE technology_university_hospital; CREATE DATABASE ...
0
votes
1answer
28 views

Best Innodb Buffer Pool Size for 8GB RAM?

I found out that my MySQL server is configured with only 128MB for innodb_buffer_pool_size. That is not enough considering that I have a 8GB RAM server. It hosts MySQL server and an Apache/Catalina ...
1
vote
1answer
37 views

Moving a large MySql database(Over 15 GB) from server to server mysqldump

I need to move a mysql database that is about 17 GB that is on a Cpanel/Centos based server that I do not have root access, to a Centos server that I have full root access. I do have limited SSH on ...
0
votes
1answer
28 views

Most used tables in MySQL database server

Can somebody please help me with a query that lists the most used tables in a MySQL database? Or how can i find out the most used tables in the database? Thanks
0
votes
0answers
16 views

Using mysql cursor data to do something for each row

I have a table incoming_sms and another table subscribers_register and another table test_subject. Some of the subscribers in the table subscribers_register have sent in some sms and the messages are ...
0
votes
0answers
16 views

Mysql connections not closing

I have a web application running on Tomcat7 that connects to MySQL 5.5. I have two servers running the identical code: Ubuntu Red Hat The Ubuntu one runs fine maintaining a steady 8-16 ...
1
vote
1answer
22 views

MySQL wait_timeout setting ignored

I have a MySQL 5.5 instance running on a RedHat distro. I have edited my.cnf with the following setting: wait_timeout=30 However, client connections are sleeping and never getting killed. The ...
0
votes
0answers
15 views

MySQL,- changing collation causes big problems

For one of my tables I have changed the collation from latin1_swedish_ci to utf8-unicode_ci. Then one of my queries, run from a synchronization script, ran amok. It cause sessions to lockup and not be ...
1
vote
1answer
14 views

Warnings while running AutoMysqlBackup

I am using Automysqlbackup.sh file to take MySql backups on Ubuntu.I have only 1 database. But when i run this script then it generates several Warnings (plus a error mail) like below Errors reported ...
0
votes
2answers
27 views

Copy database from one mysql sever to another mysql server

Following are the details of the database and server: Server1: Host Name: abc Port Num: 01 database: test Server2: Host Name: xyz Port Num 02 database: spareparts userid: spts password: abcdefgh@123 ...
0
votes
1answer
4 views

server running- mysqladmin error- Development Source Tree

I'm frustrated! I have installed mysql using Development Source Tree(version 5.7.5) in Ubuntu 14.04 32-bit. Starting I started mysql in safe mode using: mysqlnew@dpaks:~$ mysqld_safe & [1] ...
1
vote
3answers
84 views

500 databases or 1 database with 500 tables or just 1 table with all the records? [closed]

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
0
votes
4answers
90 views

Why does this query take 32 sec to execute?

I keep my history records in one table and my pertinent data in another. I want to grab only the files from myfiles that currently have a given status recorded in statuses (ie, the latest status is ...
0
votes
1answer
45 views

MySQL slave stuck at 'System lock' most of the time, high CPU usage

Let me describe what we are facing now: We have a MySQL Master-Slave, Row Based Replication setup and at the moment, the slave is stuck with a perpetual System Lock. The Master is an active server ...
0
votes
2answers
41 views

Can I permanently lock a MySQL table to prevent inserts

I have a complicated situation where I would like to prevent inserts into a MySQL table, but keep it open for edits/updates to existing data. Can this be done? I've searched around here, but could not ...
0
votes
0answers
15 views

Why would a MySQL 5.6 slave's AUTO_INCREMENT value be different from the 5.1 master's?

I have a MySQL 5.6.21 slave that is replicating from a MySQL 5.1.73 master, and I noticed that for two of the tables, the 5.6.21 has slightly ahead AUTO_INCREMENT values than the 5.1.73. I have ...
0
votes
1answer
31 views

How do I find duplicate values in multiple columns over different rows?

I have a database with a table of games (some columns omitted): gameid hometeam awayteam `date` Sometimes games are added with the same home and away teams, but on a different date that is just 1 ...
0
votes
1answer
16 views

Does mysql rand() internal working use time to produce randomness?

I have some records in a table and i am viewing each record at a time.Its not important that i read the records one after the other sequentially so i am using rand() like select quantum_qubits from ...
0
votes
2answers
13 views

Creating a MySQL db from an Informix database

There is an existing database that was created in Informix. I would like to export it and then import it into MySQL. I tried to export it using dbschema and it created the dbase.sql file and several ...
1
vote
1answer
20 views

How to group by on two fields and count

CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user1` varchar(255) DEFAULT NULL, `user2` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT ...
0
votes
2answers
18 views

Using concat inside a stored procedure parameters

I have a stored procedure and function that accepts a varchar as a parameter and i have this code where i am using concat function in the parameters of such function and stored procedure. DELIMITER ...
1
vote
1answer
21 views

Is it possible to automate the creation of multiple FEDERATED tables in MySQL?

From the MySQL documentation on creating tables for to access data on a remote MySQL server using the FEDERATED storage engine: The basic structure of this table should match that of the remote ...