MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
3 views

MySQL Workbench error: Attribute error 'nonetype' object has no attribute 'parameterValues'

I am trying to export a database but i don't have access to "server administrator" at all... everytime i try to do something from Server administration i get the message mentioned in the title. What ...
0
votes
1answer
15 views

Best Approach to Migrating Oracle to MySQL - Run on EC2 in AWS

I'm trying to migrate an Oracle schema as well as all of the data within the DB to a MySQL database. I want to then make an EC2 app on AWS to kick off whatever I've written for this. Are there any ...
0
votes
0answers
21 views

MySQL Transaction with rollback upon @@error

I have done several transactions with MySQL but mainly using php's libraries as the handle. Using php you would have something as: $pdo->beginTransaction(); $pdo->execute(' query1; ...
1
vote
1answer
48 views

MySQL JOIN two tables and get latest result

I want to JOIN two tables and get the latest result from each one of those two in a single table. I'm kind of concerned about speed too since tables are growing kinda fast. Close to 60-70k records a ...
0
votes
1answer
17 views

MySQL Server > 90% memory consumption

I have a fairly large (16 vCPU / 47 GB of RAM) linode box which hosts a running MySQL Server. This box currently does nothing else (and we are not planning to install anything else on it for now). ...
0
votes
0answers
15 views

Update a field in table when a combination of three fields with a second table is matched

I have a database form an old archaeological project which I imported into a mysql DB. I have a table "graves" with 400+ entries: "graves" id necr burials single multi 1 1 1 ...
0
votes
0answers
5 views

Role based access control protocol for resources in mysql database

I have a mysql database for an application which contains users and resources, like for example books, movies, tv-shows and music. Users should be able to view and edit specific entries of this ...
0
votes
1answer
11 views

pt-table-checksum toolkit for few databases from file

I've got a question. I'm doing a simple script right now and it isn't working like I want. #!/bin/bash cat /etc/backup.conf | egrep -v "(^#.*|^$|^--.*)" > /tmp/databases while read ...
0
votes
0answers
15 views

Simultaneous READ COMMITTED transactions updates a select for update columns

I have a READ COMMITTED transaction in which I am trying to update a row and increment a column value till it reaches a bucket value contained in another column. Please see the code below CREATE ...
0
votes
0answers
13 views

Difference between Handler_write and Innodb_data_writes

Handler write is the number of requests to insert a row in a table. InnoDB data writes is the total number of data writes. Questions are Does inserting a row count as a disk write? If I do an ...
0
votes
0answers
11 views

DB Design for Mobile App Clients

Hello I am new to designing DB for Mobile App where speed is the Key. My Mobile App will request to WebAPI and WebAPI will get data from MySQL. I have designed my tables in MySQL as per relational ...
2
votes
1answer
30 views

Optimizing a 3 table join query

SELECT job.id_job, job.fk_company, job.fk_user, job.fk_job_category, job.fk_job_type, job.fk_place, job.job_identifier, job.external_job_id, job.title, job.short_description, job.status, ...
0
votes
3answers
29 views

Initials separated by periods (e.g. J.E.F. Smith)

In a MySQL database I have a column that holds the initials of a person. However not all input is nice and clean. To give an example the initials for the name John Edward Fredrick Smith should be ...
1
vote
2answers
27 views

Will frequent small select queries slow down frequent write queries in InnoDB table in MySQL?

I'm running a MySQL database with tens of tables in remote server. To monitor the data, I write a small program to query to database via VPN connection every 10 seconds. Each query is a union of 20+ ...
0
votes
0answers
10 views

Connection to mysql database- alternating usernames

My server has a max_connections value of 400 and a max_user_connections of 250. Since I am always connecting with the same user name, my effective max_connections is 250 instead of 400. To solve this, ...
0
votes
0answers
9 views

MySQL group concatenation - creation of insert statement on temp table

I have a temporary table TEST_GROUP, from where I'm working its data to fill another one. From this table, giving the example in the picture, my expected result is to group these three rows, so I ...
0
votes
1answer
14 views

MySQL binlog limitations

I have a MySQL instance running on AWS, with around 5000 inserts per second. Any idea what the performance impact will be if I use binlog (row) and a binlog tailer? Check this link From my ...
0
votes
1answer
28 views

Optimize Wordpress Mysql Query that take 5 seconds to execute

Here is my original post: http://wordpress.stackexchange.com/questions/189736/optimize-wordpress-query-that-take-5-seconds-to-execute I have a large wordpress mysql database (Server version: 5.6.22): ...
0
votes
0answers
11 views

Requirements for Setting up mysql cluster [on hold]

I am very new to MySQL cluster, have been reading a lot online but could not find answers to my questions. I am setting up a MySQL cluster for an application that may scale in months to come. ...
0
votes
1answer
38 views

How many database users/admins should be created for a website?

I have created a CMS website that only had one database connection for both the admin area and the user area and it only had one user("root") with no password, and now I want to upload it, but I am ...
0
votes
2answers
22 views

Fixing MyISAM database without losing data

My old server was crashed but I was able to recover the databases from MySQL through testdrive. I'm trying to dump a database using mysqldump but it gives error for certain tables are crashed and ...
0
votes
1answer
25 views

Selecting distinct records having multiple properties

For following table data: ID | Property ================= 1 | Sweet 2 | Sweet 2 | Sour 3 | Hot How can I get the ID's having Property Sweet AND Sour (in this example, 2) ...
0
votes
2answers
32 views

Merge MySQL tables without data repetition

My situation is this: I have several DIFFERENT tables in my MySQL database with the same name columns. Such tables can contain (or not) the same data. What I need to do is a kind of "merge" between ...
0
votes
1answer
37 views

how to use a specific column for a day

CREATE TABLE `csptargets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `start_date` datetime NOT NULL, `end_date` datetime NOT NULL, `cspcode` varchar(11) NOT NULL, `vol`decimal(20,3) NOT NULL ...
0
votes
0answers
13 views

What are the type of drivers for Communication with Java?

I am developing one application using core java and Mysql Database. As i read in Most of the site, they suggest that use type 4 driver for communication using JDBC. In JDBC Connection i have use ...
0
votes
0answers
9 views

change the name of the database according the changes in while loop [migrated]

<?php $sql="SELECT topics FROM subjects "; $result=mysqli_query($db,$sql); for($x=1;$x<=4;$x++) ...
1
vote
1answer
49 views

Optimizing a query that performs worse on a smaller dataset

I am trying to run this query. The * is just for simplification, I'm selecting ~10 specific fields for some calculations. SELECT * FROM `orders` LEFT JOIN `orders_processed` ON ...
2
votes
2answers
59 views

Can't select 2 tables at the same time

I have a pesId (peopleId) column at pessoas (people) where is stored data from medics and patient. Also I have a table that stores medical consult information like Date, patient id, medic id and ...
1
vote
2answers
39 views

SQL Error (2027): Malformed packet

I have a mysql database (Version 5.6.23-log running on windows) that is set up for use with Teamcity. When running a command against it using HeidiSQL I am getting an error: SQL Error (2027): ...
0
votes
1answer
28 views

How can I delete all users except 1 [on hold]

How can I delete all users except 1 in mysql database in phpmyadmin.(it's a joomla 1.5 website database)
1
vote
1answer
37 views

MySQL: Why is inserting data with transactions faster then without them

I am using stored procedure to generate sequence consisting of prefix and number in given range (etc sequence "AB100", "AB101", ..., "AB199", "AB200") The stored procedure includes REPEAT loop, in ...
0
votes
1answer
18 views

MySQL “SLEEP” command throws syntax error

The 'SLEEP' command in MySQL is throwing a syntax error: mysql> sleep(5); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version ...
0
votes
1answer
30 views

mysql Quiz leaderboard filter by points, time taken

I have a quiz report table which shows a report for every quiz a user takes. I need to create a leaderboard from this, which shows the top users best score, filtering by points and then time taken. ...
1
vote
1answer
51 views

How to speed up query containing concat() in WHERE clause?

In my company we use a commercial software running with mysql 5.5 (MyISAM) that often executes a query of this form: SELECT table1.attrib1 FROM table2, table1 WHERE table2.status = 'Active' ...
0
votes
0answers
20 views

Ideas for Database schema for Automotive web app

For the last couple of days I have been searching all over Google for database schema for my automotive web application[like a marketplace of sort](in Laravel 5 PHP). I have tried many models some I ...
0
votes
0answers
48 views

Outer left join with WHERE loses row

The line below MUST be in query or the null rows when joining are dropped. Why is this? //If I don't add this line; I lose rows where items.name IS NULL $this->db->or_where('items.name ...
0
votes
0answers
55 views

MySql Innodb Database Slow INSERT Query to Remote Server

I have searched thoroughly on how to improve general performance of my database which is hosted on Hostgator. I have mostly come across performance tuning strategies which are catered to only local or ...
1
vote
1answer
24 views

Can you enforce uniqueness in MySQL based on column in foreign table?

I am refactoring one of my database tables and I've come up with an issue. Specifically, I have a table with four columns. We'll call the first three my.a, my.b and my.c. I have a uniqueness ...
0
votes
0answers
20 views

MYSQL - number of rows returned equals number of connections?

Does my query get sent to the database once and I get a list of all the results in one shot which I then loop through, or do I have to request the next row from the DB each time? Essentially, does ...
0
votes
1answer
38 views

MySQL command “SHOW DATABASES” returns invalid databases

I have a MySQL server with a number of databases on it - 16 if I'm not mistaken. When I run the SHOW DATABASES command I get 30 rows. I would have expected 17 rows: The 16 databases and ...
1
vote
1answer
61 views

MySQL Index Creation Internals

Right now there are two ways to build an index of a table in MySQL: Create the table structure first, then import the data and add indexes later. Create the table structure with indexes and then ...
1
vote
0answers
41 views

MySQL bulk deletions

I am currently looking at how to most efficiently delete rows from a table in bulk. The database I'm using is MySQL with innodb. The table I want to delete from can be any size, but will usually be ...
0
votes
1answer
18 views

Cannot overwrite file: /var/lib/mysql/ibdata1 when using Percona xtrabackup

I am receiving an error when I am trying to restore from a percona backup to my local mysql server. Cannot overwrite file: /var/lib/mysql/ibdata1 at /usr/bin/innobackupex line 2128. sudo ...
0
votes
0answers
14 views

how to do a backup and restore for a single database with mysql enterprise backup

I am Chinese, the documentation of mysql enterprise backup is hard to understand for me, and now I need to finish my job quickly, I wonder is that possible to backup a single database and restore it ...
3
votes
1answer
70 views

How to check foreign keys related to a table

How to see foreign keys related to a table in MySql? Background : I wanted to drop a table in MySql which has a foreign key constraint. When I do it I get this: Error Code: 1217. Cannot delete or ...
0
votes
0answers
17 views

hashed password retrieval in mysql

here I am again with the next question! I hash a password as follows: mysalt=os.urandom(12).encode('hex') passhash =mysalt + pw hash =str( pbkdf2_sha256.encrypt(passhash)) How can I verify this ...
0
votes
0answers
15 views

What could cause 300+ connections from a simple query in MySQL?

I am retrieving results from a table in MySQL 5.5. When I run even a basic query on this table hundreds of connections are shown in the Server Status screen in MySQL Workbench. Even for a simple query ...
0
votes
0answers
22 views

Post categories model for a user submission wedbsite

I'm building an user submission site where users can make posts to content_types: Blog, Movies, Photos, Forums. Since these content types only have slight variances I would like to keep them in one ...
0
votes
0answers
22 views

Filesort when using view

I am sorry for asking, but I can't figure what i am doing wrong and filesort appears in my explain. The id column that I use for sorting in the following examples is a primary key... If I create ...
0
votes
0answers
15 views

Working on a blog creation website; should I be creating a new table for each blog, or keep everything on the same table?

So I'm working on this blog creation website as a side project. I don't actually expect it to become anything, but I want to make it as efficient as possible, even if just for practice. The idea is ...