MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
6 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
12 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 ...
1
vote
3answers
46 views

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

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
1answer
37 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
22 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
34 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
8 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
0answers
14 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
14 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
16 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
11 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 ...
0
votes
1answer
12 views

create federated copy of a table?

From the MySQL documentation : The basic structure of this table should match that of the remote table, except that the ENGINE table option should be FEDERATED and the CONNECTION table option ...
1
vote
1answer
19 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
13 views

Migrate database from server old to new server with centos [on hold]

I want to migrate to disclose new database that works with CentOS operating system to work on network
0
votes
0answers
10 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
19 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
21 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 ...
0
votes
1answer
11 views

Accuracy of mysqldbcompare vs other tools like pt-table-checksum

I was curious to hear what everyone's experiences are with using mysqldbcompare vs pt-table-checksum( from Percona Toolkit ) to find the differences between two MySQL databases. I have heard that ...
0
votes
0answers
9 views

mysqldbcompare shows checksum fail but row differences passes between MySQL 5.1 and 5.6 databases

I have started to try using mysqldbcompare to help me compare two databases(one is MySQL 5.1.73 and the other MySQL 5.6.21) that are each about 5 gigs with lots of tables, but the databases are ...
1
vote
1answer
23 views

Large MySQL table, inserts with primary key check

I have a table with 12 million of rows and a following task I should frequently perform: Get search results from somewhere (50 rows). Each result has a key looking as a md5 hash and a table's PM is ...
0
votes
2answers
21 views

Returning true or false in a custom function

I have this mysql table schema CREATE TABLE `nxt_records` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `tel_number` VARCHAR(50) NULL DEFAULT NULL, `nxt_status` VARCHAR(50) NULL DEFAULT NULL, ...
0
votes
2answers
38 views

One field with multiple values?

I know that what I'm asking can't be done or shouldn't be done, but I really don't know how to do it. This is the problem: 2 tables: - Drivers (id_driver, name, etc...) - Trucks (id_truck, model, ...
0
votes
1answer
22 views

Workaround to avoid read-only table locking during execution of MySql OPTIMIZE command

We need to optimize a large table (on a weekly basis) in order to reclaim disk space, since records are being deleted regularly from the table. The table in question is an InnoDB table and the ...
0
votes
1answer
14 views

MySQLfabric — Manage setup problem

MySQL fabric does not get configured , getting these errors : [mysql@dev-dm-gitest101z /root]# mysqlfabric manage setup Error : [INFO] 1413953890.788408 - MainThread - Initializing persister: user ...
0
votes
2answers
25 views

VARCHAR primary key - MySQL

Currently, I have a categories table with 2 columns - category VARCHAR(50) NOT NULL PRIMARY KEY and parent VARCHAR(50). The parent column is a foreign key (FK) to the category column. This seems like ...
0
votes
1answer
20 views

How to get all the months from the last paid date in MySql?

I need to get the all the months from the last_payment_Date for the user from that table for processing purposing. As of now i am using this query.. SELECT `Name`, `Acc_No` FROM `user_table_details` ...
1
vote
1answer
19 views

mariadb - EXPLAIN works but ANALYZE throws ERROR 1064 (42000) error in SQL syntax

I want to see the execution plan of a query to find out why it is slow, but ANALYZE does not seem to work, it throws an error on the same query that EXPLAIN accepts. MariaDB [dbx]> explain select ...
1
vote
1answer
29 views

Query where there are only two rows with specific data

I have a table with room which has a data of who are in it. Each room has have 0 to any number of people and each person can be in multiple rooms simultaneously. (simplified below) id name 1 ...
1
vote
1answer
19 views

mysql - sum interval dates

I would like to sum the hours for each name, giving a total interval between START and END activities. It would be simple if I could subtract from each record the end of the beginning. For example, ...
0
votes
0answers
13 views

How to model efficient permission checks for a social network?

The goal is to build a facebook like permission system. So that users can grant other users access on objects based on a direct assignment (allow user X to see posts) or allow users to access them ...
0
votes
0answers
28 views

“DISTINCT” JOIN in mySQL

+----+-------------+-----------+---------+ | id | login_ip | hostname | user_id | +----+-------------+-----------+---------+ | 1 | 192.168.0.4 | 'host 1' | 1 | | 2 | 192.168.0.4 | 'host ...
0
votes
0answers
26 views

MySQL Upgrade from 5.5 to 5.6 causes system / table locks

We recently upgraded from MySQL 5.5 to 5.6 on AWS RDS. Before, we had a relatively performant database - definitely had its quirks, but it seemed to be tuned relatively well. After the upgrade, we're ...
1
vote
2answers
45 views

Upgrading hardware for MySQL. If we get SSDs, are CPUs likely to become a bottleneck

We are upgrading hardware for a MySQL database server (DB is around 200GB). We're getting 4x Samsung 850 Pro SSDs and are planning to run them in a RAID10 configuration. Also, 128GB of RAM. The ...
0
votes
1answer
50 views

Retrieving month from date field in my database

i have dates stored in database with the function : CURDATE() , when a user makes an order . Now with a form where the admin chooses the month and the year , i want a query to display all the orders ...
1
vote
1answer
35 views

Trying to combine one row from one table with mulitple rows from another table but not sure if I'm doing it right?

The Situation I have two tables unit and unit_translations defined as: CREATE TABLE `unit` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255) NOT NULL COMMENT 'Title of unit', ...
1
vote
1answer
43 views

Can't start MySQL server because of wrong file permissions?

I'm trying to start the server and then fix the root user by $ mysql -u root mysql $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root'; $mysql> FLUSH PRIVILEGES; But ...
1
vote
1answer
24 views

Converting 'False'(string) to False(boolean) During LOAD DATA LOCAL INFILE

In MySQL is there anyway of loading "False" into a boolean column. While loading data in table having boolean column and where data is in "True" or "False", it gives warning of: "Incorrect integer ...
0
votes
0answers
16 views

Best way to approach building search functionality using PHP on existing mySQL Database

I am looking for advice on how to approach an upcoming project I am due to undertake. The reason I am asking is that I'm just out of college and the company I work for is currently searching for a new ...
3
votes
1answer
72 views

When is mariadb creating tmp tables?

I have found, that copying to tmp table is taking most of the time of a slow query, that I wanted to optimize. I watched the output of 'profiling' in a terminal. This happens on a pics table with 6000 ...
0
votes
2answers
38 views

How to allow remote connections to mysql from specific IPs only?

I have a fresh install of mysql server 5.2.6 on a 64 bit Ubuntu running on a remote server with static IP. Is there anyway to allow Mysql remote connections to be made from pre-approved IPs only? I ...
0
votes
0answers
30 views

MYSQL Out of memory, table crashing

an specific table on my DB keeps crashing. I suspect to be a bad buffer setting on my.conf, it show this error before crashing (most of the time it needs to be repaired): 18:26:59 [ERROR] ...
1
vote
3answers
63 views

Deleting data from a large table with replication

I need to delete all the rows from a given table. The table contains millions or records. The master database is being replicated to several slaves and I wish to do that without creating a replication ...
0
votes
1answer
18 views

Using pt-table-checksum to compare a slave's DB to another slave

I understand that pt-table-checksum can do checksum compares between a master's DB and a slave's DB easily. However, let's say your master has two slaves replicating from it for the same DB, i.e. ...
0
votes
0answers
16 views

Using partitioned table, and dealing with auto_increment PK

I have a big table (>100 million rows) that tracks user's activities. It has an ID, which is PK and has auto_increment property. This is the only unique key. Table also has userid and datetime column. ...
0
votes
0answers
15 views

How to store highly configurable relationships based on multiple conditions

I'm trying to devise a schema that needs to be extremely configurable when necessary, but also minimal wherever possible. There is a large number of condition types that would lead to a number of ...
0
votes
1answer
19 views

Importing a SQL Dump File through XAMPP's Command Line

A few days ago, I exported a .SQL dump file with all my databases, which is about 150MB. The thing is I cannot import it through phpMyAdmin since the file is way to big. I remembered there was ...
0
votes
1answer
22 views

increasing disk space for mysql data volume

I have a master mysql server which has approached 80% of the available disk space. Total disk space size is 200GB. Though, it's not an immediate concern but I have to deal with at some point soon. the ...
0
votes
1answer
18 views

How to deny access to any system user who attempts to log in without password usage?

I have mysql-server-5.5 in Ubuntu Server 12.04 I realized that when typing mysql command logged as any system user I got access to mysql, despite I can only display test and information_schema ...
0
votes
0answers
15 views

MySQL on Server side PRIMARY KEY taking automatically random Id

I have problem in my database which i have uploaded in Database Version libmysql 5.1.73 In that i got problem like one PRIMARY_KEY field incrementing random values. inserted id's like 1, 2, 35, 67, ...