MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
51 views

Tuning MySQL query from explain

I am working on a search query in MySQL. I am getting this from explain: Original screenshot These are my indexes: Table definition: Original screenshot Query: SELECT `t`.`id` AS ...
2
votes
1answer
29 views

MySQL server won't start with foreign_key_checks=0

I'm running Ubuntu with MySQL version 5.5.44 mysqld Ver 5.5.44-0ubuntu0.14.10.1 for debian-linux-gnu on x86_64 ((Ubuntu)) I have a DB with foreign keys. I would like to have the foreign key ...
1
vote
0answers
22 views

Demoting a MySQL Master to Slave [on hold]

I recently had to fail my master over and promote a slave due to a network outage. All of that worked fine. Now that the network is back, I'd like to add my old master as a slave of the new master. ...
1
vote
1answer
25 views

Migrating all MySQL databases from from one server another. Getting error during import

I create a mysqldump on all the databases on the source server with this command: mysqldump -h mysql-01 -u root -p --all-databases > newdump.sql This takes about an hour, but runs fine. Now, ...
0
votes
0answers
21 views

How can I get the latest value per unique ID, then count the number of entries with that value? [on hold]

Ok, so I have a table that has device_id, lots of other stuff, and network_type. I currently run the following query: SELECT partner_name, COUNT( IF( network_type='ethernet',network_type,null )) AS ...
0
votes
1answer
23 views

inner join on true

My table: abc +--------+ | letter | +--------+ | a | | b | +--------+ Query: SELECT * FROM abc t1 INNER JOIN abc t2 ON true Result: +--------+--------+ | letter | letter | ...
0
votes
1answer
9 views

MySQL / DRBD / Pacemaker on EC2

I am trying to setup DRBD/MySQL/Corosync/Pacemaker on AWS EC2 instances, though I am not sure if it will work since how to integrate VIP is a problem for me. Anyone have any thoughts on what to do ? ...
-4
votes
0answers
23 views

what is update cascading exactly in sql? [closed]

We have three table declarations for P1(A), Q1(B) and R1(C) with referential integrity in SQL. create table P1 (A primary key); create table Q1 (B primary key references P1(A) on update ...
2
votes
2answers
19 views

Should the Redo log on a production MySQL server be configured to another location?

Concerning the innoDB storage engine, should the innodb_log_group_home_dir option (The directory path to the InnoDB log files) be configured to another disk, other than the default directory, in order ...
3
votes
2answers
28 views

MySQL Multi-Master Replication Topology

Disclaimer: I've never worked with replication before, but I'm doing all my research. Not really having a bunch of in-depth knowledge about MySQL makes a lot of the documentation hard to understand. ...
1
vote
1answer
28 views

MySQL Matching records across tables discrepancies

I have a database called match, within this database I have a number of tables. Of which in particular I need to marry up two datasets in different tables to identify email addresses that are not ...
2
votes
0answers
219 views

How to encrypt user passwords for forum registrations? [migrated]

What is the most secure way to encrypt user passwords for phpBB or MyBB forum registrations? I don't want anyone to be able to access the user passwords, not even those who administrate the MySQL ...
-1
votes
0answers
40 views

Is there any future scope with DBA profile? [closed]

I have appointed as DBA. And I don't have any kind of experience. Right now I am fresher and I don't have any idea about How is DBA profile ? What should I do to become a good DBA ? Is there any ...
0
votes
1answer
25 views

Using GROUPing or ROLLUP rather than SUMing every column

I am currently looking for a way to achieve what this query is doing without using SUM for every column and, if possible, GROUPing or using ROLLUP or something similar. This query gives me a total ...
1
vote
1answer
36 views

Which technology to synchronise SQL Server and MySQL data?

Which technology should be used if I want to move my data from SQL Server to MySQL server when data is entered to SQL Server row by row and getting feedback from MySQL server? Should it be 1. ...
0
votes
0answers
19 views

Issues in enabling binary logging

I am using MySQL 5.5 RHEL 6 I have made these changes in my.cnf file. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent ...
0
votes
1answer
28 views

Find and Replace text in all table using mysql query

I have a database with name test having two tables sample1(name, quote) sample2(name, quote) I need a replace function or procedure that does the following Find columns with String data type ...
0
votes
2answers
18 views

Config file location in MySQL

I have MySQL 5.5 running in RHEL. I have checked for my.cnf file in my filesystem and its available in two destinations. One in the user's home directory and the other is in /data/etc_ORIG directory. ...
1
vote
1answer
17 views

A view to show worked time per task per user?

I have written this fiddle CREATE TABLE task (`taskid` int, `description` varchar(255), PRIMARY KEY (`taskid`)) ; INSERT INTO task (`taskid`, `description`) VALUES (1, 'Platform for ...
1
vote
0answers
22 views

Single Redshift table vs several mysql/ pgsql (on RDS) tables for small (200 tables * 20 columns * 1 million) monthly aggregation data

We're providing SaaS Data Analytics Dashboard for around 200 clients. We're using Amazon Redshift for storing data in in around 5 tables. We're getting around 30 million hits per day. Currently our ...
0
votes
0answers
8 views

Java error: The url cannot be null ( netbeans and wampserver) [migrated]

I'm creating a java application (stock management) with Netbeans and Wampserver, I create the stock_db_connection class and the Login class, and I want to test if it's work or not, when I click run ...
0
votes
2answers
31 views

Multiple types of parts with multiple types of information (unspecified amount) [duplicate]

I'm having trouble designing a database for a project I was working on recently. It's to do with a garage management system. So I've realised I need to store multiple types of parts (Tyres, engines, ...
0
votes
0answers
30 views

Correction of a complex query [closed]

I don't know if this question is appropriate on this forum. I have a huge query : SELECT threshold.id, brand.id, COUNT(brand.id), threshold FROM current_stock, article, product, brand, delivery, ...
0
votes
1answer
44 views

Lock wait timeout exceeded; try restarting transaction in NDB

I encountered an error while using an opensource product with a mysql cluster. The error stacktrace is shown below. Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting ...
0
votes
1answer
29 views

Use of log_bin_trust_function_creators in MySQL

What is the use of log_bin_trust_function_creators? Also, Is the value of the parameter dynamic? Will it change if I restart my MySQL service?
0
votes
1answer
16 views

Replicate update statement as Insert in Mysql 5.6

I want to replicate all update statement from Master as a Insert at slave end. 1. Is it possible like in SQL Server ? 2 If so , how ? I want to do it because , if any record on master is ...
0
votes
0answers
29 views

Tuning MySQL with InnoDB engine for my application

I've read through a lot of answers, and I realize this is mostly application specific, so I wanted to give some background as to what I'm doing with the database and hopefully get some tips on tuning ...
0
votes
2answers
68 views

How to improve perfomance or Query Execution Time in MySQL?

This is my query: SELECT a.z_companyid_pk "z_companyid_pk" , a.company_name "Client" , a.display_name "Display_Name" , ...
0
votes
1answer
30 views

Mysql backup bug

I'm trying to run a SQL file created by mysqldump and suprisingly I get a SQL syntax error while running the backup file on the DB. How can it be possible considering that the file was created with ...
1
vote
1answer
20 views

Moved a MySQL Database to another server, but socket keeps pointing to localhost

I know I shouldn't bother with this, maybe I should disable the old mysql, but this is a Magento virtual appliance from Bitnami thats work as a whole (application and database on the same server). I ...
4
votes
1answer
44 views

Fast alternative for “NOT IN”

I have a table A that got a field called id that is the primary key of this table. I also have a table called B which also have a field called id as primary key. Now I want to get all rows from ...
1
vote
0answers
33 views

I need to find the “rank” in a sub-set of entries

I am currently working on some sort of a highscore list. But values displayed are individual for each user, ie. limited by constraints. One constraint that I am currently working on is "being part of ...
-1
votes
0answers
25 views

Can MySQL Enterprise Edition be used for free with no time restriction? [closed]

My question is about product licensing by Oracle, specifically about MySQL Enterprise Edition licensing. I am not any DBA Master, I'm just a developer in search for answers from the real experts. ...
0
votes
2answers
31 views

Finding two users with same pair group

I have the following table which details actions of users and the action's parameters: action_id(auto-increment) | user_id | action_name | action_attr1 I want to find which users performed the same ...
1
vote
1answer
31 views

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental?

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental? Note: There was a design constraint that led this ...
1
vote
0answers
52 views

How to pass the value of PK to FK

Ok, so here it goes. I have a table called employee. then I have another table called languages. I need to copy the value of PK of employee table to foreign key in Languages table, rather than ...
-2
votes
0answers
24 views

MySQL Workbench cloud alternatives [closed]

I have some analyst who runs some particular queries which are provided by me. Now when a new analyst joins our team I have to install MySQL Workbench on their laptop to set up the connection. I went ...
1
vote
1answer
34 views

Is it necessary to create foreign key in this query? [closed]

I have the table called investors having as primary key the column id. I have the tables Users, Login_Logs and Accounts. All of these tables contains the foreign key investor_id. Between investor and ...
0
votes
0answers
28 views

optimizing a wild card search query in mysql

I want to have a search option in my game portal site. (right now i'm using google's in site search) I want a user to search to enter a search term and need my query to search the search term in the ...
1
vote
0answers
33 views

Master/Slave and Master/Master replication - MySQL

What is the difference between having a master-slave replication and having a master-master( where in the second master acting as hot-standby - active-passive) replication? Also, what are the issues ...
3
votes
1answer
34 views

MySQL query WHERE IN + ORDER BY, which EXPLAIN is better and how to avoid filesort?

This is my table definition, without any special index for now: CREATE TABLE `filter` ( `field_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `category_id` varchar(32) COLLATE ...
1
vote
1answer
22 views

Data and index file compatibility between patch/revision releases of MySQL

Let's say a server is on MySQL 5.6.1234 (yes I know that number's made up) and gets updated to 5.6.1235 (so an increment in revision / patch number). How safe would it be roll back MySQL to 5.6.1234 ...
0
votes
1answer
16 views

Is my import still committing?

I'm importing around 9 million rows into my MySQL DB using the following command: SET autocommit=0; SOURCE my_import.sql; COMMIT; The command line is no longer outputting lines of Query OK, X rows ...
0
votes
1answer
24 views

How to do an efficient case insensitive search

As an example, take a city table with 2 columns city_ref (bigint) city_name (varchar) with indexes on both. I want to do a case independent search by city_name. I know I can use like but ...
-1
votes
1answer
25 views

what is problem with time field in mysql during insert or update time? [closed]

I have created a time field in MySQL. During INSERT or on UPDATE, if I don't select the time then the time field gets a default value of 12AM. However, I want to set this time field to NULL by ...
0
votes
0answers
24 views

Operation failed with exitcode 1 - while importing from a dump folder

I'm new to dbs and I'm trying to learn how a certain db works. They gave me a dump folder to play with it but, after setting up a connection (works), while trying to import, I get this annoying ...
0
votes
1answer
20 views

MySQL ERROR 2013 Lost connection

I am running a real old version of mysql(3.23.56). Everything is good, expect when I want to delete all entries of a table. I have checked query, like drop, select,update, their behaviours are ...
1
vote
0answers
22 views

Migrating tables from SQL Server to MySQL

I am using MySQL Migration Wizard to copy some tables from SQL server to MySQL local instance. When I define the source and target connection and test them I get a Connection Successful message and ...
0
votes
0answers
9 views

Would a nosql db handle sorting by latitude and longitude queries as well as a mysql db?

I have a table with a couple hundred advertisers including the latitude and longitude of the centroid of their zip code. I will also know the centroid of the zip code of website visitors. What I want ...
0
votes
1answer
30 views

Is it possible to convert mssql to mysql?

I've mssql.sql file I need to convert to mysql schema. Any ideas how? I'm on mac, I guess my choice is very limited. Tried workbench but it asks me for a live server connection to mssql which I don't ...