MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
2answers
18 views

Insert query in mysql

I am using MySQL. I have table like below: CREATE TABLE test_table ( first_name VARCHAR(20), last_name VARCHAR(20), full_name VARCHAR(40) ); Now I want to insert values like below: ...
1
vote
0answers
47 views

Get all data from two tables and group it into different category in mysql

These are my tables to build an FAQ: CREATE TABLE `tbl_section` ( `section_id` int(11) NOT NULL AUTO_INCREMENT, `section_title` varchar(100) NOT NULL, PRIMARY KEY (`section_id`), ...
1
vote
0answers
13 views

Error: Operand should contain 1 column(s) [closed]

select d.id as id,dl.id as dlid,d.documentno as docno,d.documentdate as docdate,d.entityname as customer,dl.inventoryname as product,(select group_concat(distinct case when p.process='PRE PRESS' then ...
1
vote
0answers
35 views

Merging Databases with Same Schema

I have been developing a (MySQL) database in the cloud for the past few months to link in to a web based service. Following a change to the roadmap the initial clients will be running on standalone ...
1
vote
0answers
21 views

Keep selected tables synchronized across MySQL databases

I've a need that requires me to keep a number of tables from a database (db1) synchronized with another database (db2). db1 & db2 have different structures and a set of tables and their data from ...
1
vote
0answers
24 views

How to deal with large amounts of data - PHP [closed]

I'm currently making a postage website using php, laravel and phpmyadmin. I have a list on postcodes for different areas and each area will have a different price. E.g. Area 1 - England, Area 2 - ...
0
votes
1answer
17 views

MySql DB from Ubuntu to RHEL

I would like to migrate my Mysql databases from Ubuntu to RHEL..what is the best way to proceed? I'm on community edition. I will be moving to entreprise edition of MySql on RHEL.
1
vote
1answer
27 views

Mysql (mariadb 10.1.5) update against subquery

I have a list of users that I need to do an update against. select sp.name from syndicate_store2.store_players as sp, syndicate_ipb.nexus_purchases as np left join syndicate_ipb.members as mem ...
0
votes
3answers
27 views

What does MySQL mean by “Major Version”, and is MySQL replication supported between 5.1 and 5.6?

I am migrating from some MySQL 5.1 servers to MySQL 5.6 servers. The MySQL docs are a bit unclear if replication is supported between a 5.1 master and a 5.6 slave, and I'm a little confused what MySQL ...
2
votes
0answers
38 views

Suggestion To Improve My.cnf INNODB

I'm after suggestions on how to increase mysql performance on my server, any help would be greatly appreciated. CPU - 4 core RAM - 16GB Databases - 14 Innodb databases with around 20 tables in each ...
2
votes
0answers
53 views

Flexible and robust way to cull older data?

I am no DBA and that is becoming more apparent daily, as such I am having trouble keeping my query times reasonable. I have about 3.57 Million records ( at about 3.43 GB ) and it takes about 2 minutes ...
2
votes
2answers
21 views

mysql restart issue after move database

Update : I know how can terminate process or restart mysql Manually , but I want know why this problem happen and why service mysql restart not work ? and how can resolve this problem basically I ...
1
vote
1answer
54 views

Query or a New Column for Performance

I have below tables: ProductsTable (has product details), UsersTable (has all application users), RatingCategry (category for which user can rate a products like Quality, Cost etc.) and ...
1
vote
0answers
32 views

MySQL and MariaDB [closed]

Why biggies such as Google are leaving MySQL and going to MariaDB? I'm only trying to understand the technical reason or business reason behind this? How much hold does MySQL has presently on the ...
1
vote
1answer
30 views

Can I remove “/*!50100 PARTITION BY HASH…” to success with import?

I'm trying to import a database and get this message (Swedish lang phpMyadmin): As you see, I get the message: #1064 - You have an error in your SQL syntax; check the manual that corresponds ...
1
vote
2answers
90 views

How can I select data from two differents servers?

I have two databases: data1 and data2 in two different servers (server1 and server2). I am trying to join two tables of my two databases in MySQL like this: SELECT left(a.code,9) as fourn, ...
1
vote
1answer
29 views

How do I name a query table in mysql?

Let's assume I do a very simple query selecting 2 columns out of the 5 columns in a table. How do I name the query table for future use? Sorry for asking something that sounds so obvious but have ...
1
vote
0answers
89 views

How do I restore a mysql dump that was created in xml format?

I have a rather big XML formatted MySQL dump It was created with the --xml param (-X) param of mysqldump. I need to import it in. This article from 2010 indicates that there was no "built in" way ...
3
votes
2answers
58 views

Do I need a composite primary key in a junction table?

I have a junction table like this: CREATE TABLE `entitytagjunction` ( `EntityId` bigint(20) NOT NULL, `TagId` bigint(20) NOT NULL, PRIMARY KEY (`EntityId`,`TagId`), KEY ...
0
votes
1answer
24 views

restoring a EC2 snapshot on RDS

Is it possible to restore our database snapshot on ec2 directly on RDS as our database is very big ? If not can we restore using csv files. ?
2
votes
1answer
38 views

How to relate a table to other two?

I'm trying to design a database that contains, among others, entities "Photo", "Venues" and "Products". Given both Venues and Products could contain a collection of photos... how could I tell whether ...
2
votes
0answers
47 views

mysqldump restore error

I am getting the error below, while restoring a dump to RDS MySQL 5.6. Dump is taken from MySQL 5.5 originally. I tried restoring twice but same error. Can anyone help ERROR 1064 (42000) at line ...
2
votes
1answer
30 views

I want to select all records for those persons who have one or more entries that equals zero dues

DUES_TABLE ID LNAME FNAME DUES DATE 3456 Smith Bob 12.50 2014-10-01 3456 Smith Bob 0.00 2014-11-01 3456 Smith Bob 12.50 2014-12-01 9450 Jones ...
1
vote
0answers
13 views

Problem with replicate-rewrite-db not working [duplicate]

I have replication setup that has been working great. We have a master (prod) and a slave (reporting) that have been running for several weeks. We are changing the slave database through replication ...
5
votes
1answer
104 views

'SELECT my_table.id' slower than 'SELECT my_table.*'

Running MySQL with InnoDB: I have a SELECT wide_table.* query that I want to refine to SELECT wide_table.id since that's all the calling code needs. Testing it out I've found that the execution time ...
3
votes
1answer
47 views

How to Join a table to a group_contact in mySql

I have this query select concat('[',group_concat(inn.str),']') into string4 from ( select concat( '{"idmm":',customer.id, ',"cd":"',customer.code, ...
1
vote
1answer
33 views

SQL Join Field and Content

I have this MySQL Structure: CREATE TABLE Fields ( ID INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, ForUser VARCHAR(255) NOT NULL, ForCategory VARCHAR(100) NOT NULL, FieldName VARCHAR(100) NOT NULL ); ...
-1
votes
1answer
60 views

A complex query to Joining 2 tables and getting result [closed]

I have a database in MySQL. I have 2 tables, Structures as follows : t1 t2 I want to join both the tables and result should be like this : Employee_id | count(DNIS) | total_calls | count(DNIS) ...
2
votes
1answer
64 views

Best practice for when the ideal number of columns is unknown

I'm currently making a MySQL database to list products for an e-commerce site. Each product will have several sizes available which will each have their own dimensions and measurements (e.g. length, ...
3
votes
2answers
40 views

Database Tuning Issues

I'm not a DBA so looking for some advice on tuning a MySQL (MyISAM) database. I've found that during peak hours we are getting pretty severe load spikes which are slowing down the web front-end. I've ...
3
votes
1answer
84 views

To have PostgreSQL-like Partial Index in MySQL 5.5

I have big data where I only select a small interval of data at a time such that the selection is always in a sequence. I am trying to implement PostgreSQL like Partial index in MySQL which is ...
3
votes
1answer
41 views

Is it a bad practice to keep Master and Slave (Replica) Database on Same Server?

I have a database A (master) on server 1. I need to read from database A perform aggregations and write on database B. Since database A has a very high traffic, I cannot read directly from database A ...
1
vote
1answer
26 views

How to determine RAM usage of a query

I would like a detailed explanation on the below question. This is regarding the Mysql RDBMS. Thanks in advance. What are the factors that would affect the RAM usage by a query. how to ...
1
vote
1answer
16 views

Windows crashes on doing sql dump [closed]

Windows simply crashes and opens the blue screen for dumping physical memory on trying to import sql dump. Blue screen error: IRQL_NOT_LESS_OR_EQUAL So far I have tried 4 methods: Through workbench ...
2
votes
2answers
32 views

Problem with new MySQL Workbench connection

I'm working on Debian 8 and wanted to create database using MySQL Workbench. I did everything in this tutorial, but when I created a new MySQL Connection, the program returned: Failed to Connect ...
1
vote
1answer
34 views

Product attribute schema design, mixing solutions

I am working on a product database in MySQL and the products can be multiple types with different attributes. The number of attributes and there datatype vary. I read about some design patterns (post) ...
2
votes
1answer
42 views

Best way to backup mysql database?

How do you backup your mysql database so you can be sure that you are 100% protected of data loss whatever problems that may happen? I am thinking to rent one or two servers that i will use only for ...
3
votes
1answer
44 views

Why has my slave server stopped connecting to master in MySQL replication?

We have MySQL replication setup and it has been running without issue for some time. This server acts as a slave and a master (it replicates through to another server). This morning I received an ...
3
votes
3answers
67 views

How to split numbers and text in MySQL

I have searched over the internet looking for a function like REGEXP_REPLACE in Oracle, regexp_replace in PostgresSQL but I haven't find one similar in MySQL just REGEXP and RLIKE, but these operators ...
3
votes
1answer
60 views

Skip specific field name

I am trying to execute a table from a MySQL database using a for loop statement, in order to get the field names as the column header. Here is my code: $result = mysql_query("SELECT * FROM ...
0
votes
0answers
7 views

what is ord_part in dict_col_struct for MySQL? [migrated]

I was trying to understand a variable ord_part in the dict_col_t struct. Here is declaration: http://osxr.org/mysql/source/storage/innobase/include/dict0mem.h#0428 which says unsigned ...
2
votes
2answers
57 views

Would increasing innodb buffer pool size prevent a mysql crash?

My server keeps running out of memory for mysql. I keep getting. 150708 3:39:09 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 258064 bytes) When I looked in my.cnf I saw that ...
0
votes
1answer
9 views

MySQL NDBcluster 7.3 limitation on Table Joining in a single SQL statement

I am a novice user of Mysql database and recently my company is evaluating MySQL Cluster for its shared nothing architecture and synchronised replication. However my colleagues informed me that the ...
1
vote
1answer
23 views

Synchronizing a RDS instance with another RDS instance

I've a database on a RDS instance (master) that needs to be synchronized to another RDS instance (slave). I created a read-replica for the first one, but that is created as read-only so I cannot do ...
1
vote
1answer
50 views

MySql Innodb corruption recovery

I have a MySql database, just containing Innodb tables, that seems to have corrupted itself. It replicates to another server and it has corrupted that one too! The symptom is that I can restart the ...
1
vote
1answer
36 views

Migrating mysql.user table from MySQL 5.5 to MySQL 5.6

I have a tricky question. I am migrating from MySQL 5.5 to MySQL 5.6. I want to migrate 45 users in MySQL 5.5 to MySQL 5.6 Questions Should I just take a dump of the MySQL 5.5 user table and ...
1
vote
1answer
34 views

MySQL GRANT PROXY - what does it mean?

I run: show grants for root@localhost; and I see GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION From mysql docs: https://dev.mysql.com/doc/refman/5.5/en/proxy-users.html This ...
0
votes
2answers
30 views

How to export an Access database and import to MySQL?

I am working on a Java project that sources data from an MS Access database, but I want to use MySQL because I have found it to be very easy to manage. How can I export an Access database that has ...
2
votes
4answers
67 views

Row for each date, or 31 columns?

Currently I have a system whose front-end looks like this: The following query: SELECT `l`.*, `s`.`month`, `s`.`year` FROM `summarylines` `l` JOIN `summaries` `s` ON ...
0
votes
0answers
22 views

Partial restore of InnoDB from snapshot

We currently run a mix of MyISAM and InnoDB tables on an older version of MySQL. ZFS is used as the filesystem which allows us to take instant snapshots of mysql data. One useful case for this has ...