Tagged Questions

MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
28 views

Last synchronization time between master and slave (replication)

During replication process where a Master is connected with slave. Some times connection between these two goes down. Any options to get the details of the last synchronization time?
0
votes
1answer
29 views

Rescue truncated data from incorrect column type

I have mistakenly inserted a variable 18-20 digit variable into an unsigned INT() column. The data has been truncated to the max 32bit length so all my data is displayed as "4294967295" Is there ...
0
votes
1answer
36 views

Select products and include all cities it belong to

I have 2 tables : PRODUCTS +----------+----------+----------+----------+ | id | title | content | city | +----------+----------+----------+----------+ CITIES +----------+----------+ | ...
3
votes
3answers
476 views

How to achieve 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
28 views

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

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
12 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
64 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
57 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
24 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
58 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
24 views

How can i make dump of big mysql table? [closed]

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. ...
1
vote
2answers
65 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
12 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
3answers
47 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
20 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
21 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
1answer
55 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
24 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
55 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
13 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
96 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
1answer
35 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
36 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
30 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
95 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
46 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
55 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
32 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
18 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
19 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
28 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
16 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
33 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
1answer
48 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
21 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
97 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
97 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
118 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
45 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
1answer
38 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
0answers
22 views

Does mysql rand() internal working use time to produce randomness? [on hold]

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
24 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
24 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
42 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
28 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 ...
1
vote
1answer
30 views

How to change table with innodb/myisam engine to federated

In my.ini I added [mysqld] federated When I type in a shell show engines; I get this result: But when I try to change one of this tables which are on innodb engine to federated I get an error. ...
0
votes
0answers
12 views

first query on my table takes apx: 0 sec but taking too much time on or after 3 to 4 query

I have the following table in mysql database: CREATE TABLE `chronologicallists` ( `sno` int(250) NOT NULL AUTO_INCREMENT, `empSno` int(11) NOT NULL COMMENT 'Employee Serial Number', ...
0
votes
1answer
25 views

update column without auto timestamp update

Hello everyone I have got a product stock table with a time-stamp column so the so any updated to that row will update the time stamp ,I'm happy with this setting but sometimes I want to update the ...
0
votes
0answers
25 views

What are correct database structure, variable names, types?

Here is my database ERR diagram I'm new to this and I'm creating a database for the following: Question and answer website The user will interact with only one question at a time. The user can ...