All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

learn more… | top users | synonyms

-3
votes
0answers
49 views

Total newbie here: I've downloaded mysql-5.7.12-win32.zip - now what? [closed]

I've just opened an SQL manual, so it's a dumb question. But please, can you tell me what I am doing wrong? I've downloaded mysql-5.7.12-win32.zip - to actually learn by doing... And it's downloaded ...
-1
votes
0answers
12 views

Ranking function when ties are averaged [closed]

I am looking for a ranking function that averages ties rather than repeats them in MySQL.
3
votes
1answer
43 views

Slave DB promoted as Master DB when Master DB is down. New data added on the new master while old master is down

I am currently setting up a call center system (Vicidial) having a Master DB and a Slave DB. When the Master would go down, I have made a script on the SlaveDB that would execute "stop slave" on the ...
1
vote
0answers
36 views

howto read/interpret “show engine innodb mutex” output?

We use a 3 node Galera cluster with version 5.5.41-MariaDB-wsrep MariaDB [(none)]> show engine innodb mutex; +--------+---------------------------------+------------------+ | Type | Name ...
0
votes
1answer
63 views

Error 1236 - “Could not find first log file name in binary log index file”

Our setup: Master: MariaDB 10.0.21 Slave: MariaDB 10.0.17 Replication was working fine until recently at which point the slave's DBs had to be restored from a dump. I performed all of the ...
0
votes
0answers
31 views

Building MySQL InnoDB clustered indexes

Assuming that you have a table like CREATE TABLE `t1` ( `search_id` int(11) NOT NULL, `provider_id` bigint(20) unsigned NOT NULL, `status` text NOT NULL, `imported_at` int(11) NOT ...
1
vote
1answer
44 views

MySQL syntax for order by not accepted in SQL Server

I'm working through the SQL snippets for nested sets in this article by Mike Hillyer. The article is using MySQL, but I'm using SQL Server. I get the following error reported when attempting to ...
0
votes
1answer
15 views

Why doesn't MySQL installation on an Ubuntu linux 16.04 OS require user to specify LD_LIBRARY

Why doesn't MySQL installation on ubuntu 16.04's linux require the user to specify LD_LIBRARY_PATH to resolve its runtime dependencies? I tried googling to find the answer to this question, but I ...
0
votes
1answer
34 views

OFFSET using a GUID kind of ID

I would like use the OFFSET in a SELECT query so I can use pagination in my webapplication. The only problem is I only know the ID of the row from which I would like to start, not the actually OFFSET. ...
0
votes
1answer
42 views

how to decide whether table segregation is benificial or not

I have an input data feed that is significant in size. Presently, I have one table with all entries input in it. I want to find out how to decide whether splitting the table into smaller tables would ...
0
votes
0answers
46 views

Using the same tables for multiple many to many relationships

I currently have a project where I need multiple Many to Many relationships some of them are roughly and I started to wonder if using an extra column on the table to specify the table it's related to ...
-1
votes
1answer
13 views

append field to previous record [closed]

I have a table with 3 columns that I imported data from an excel file. Some of the records have data carried over to the next row in the excel file, when this happens the first column is blank and ...
0
votes
0answers
13 views

What is the 'auth_string' in 'GRANT' 'ON' SQL command in MySQL/MariaDB?

In the typical command to grant privileges: GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password"; What is the "password" part? The documentation says ...
0
votes
0answers
35 views

Recover innodb mysql 5.6 database WITH ib_logfile0,ib_logfile1, and ibdata1 but WITHOUT .idb files

I had a customer's computer shutdown/crash due to power going out and when mysql tried to boot they got. After I looked in data folder for database and there was just .frm files and no .idb files. ...
1
vote
1answer
13 views

MySQL innodb_log_file_size change is not being recognized

I am trying to set the innodb_log_file_size option in a MySQL 14.14 (distrib. 5.6.30) installation on Ubuntu 15.10 to solve an issue (importing a database with large BLOB fields) however the log size ...
0
votes
0answers
40 views

How to handle HUGE 16GB SQL file?

I've abc.sql file exported from MySQL Table. This abc.sql file is 16 GB in size with around 28 million insert statements. I'm looking for option to store it in SQL Server Database. Couple of ...
1
vote
1answer
73 views

Index not used on partitioned table

We have a table similar to this one mysql> SHOW CREATE TABLE my_requests\G *************************** 1. row *************************** Table: my_requests Create Table: CREATE TABLE ...
1
vote
1answer
29 views

Order by x DESC - but only continuous rows

I have a table with an ID (integer) and a text field (the name). My current query looks like this: SELECT id, name FROM table WHERE id <= X ORDER BY id DESC X is an ID I get from another query. ...
0
votes
0answers
33 views

How to check the age of a user using triggers

Im new to databases so sorry in advance for maybe obvoius questions. I have a database where i want to block new user registrations if the age of the user is less than 18. How to count the age? ...
0
votes
1answer
85 views

What is difference between JOIN and simple query

I have two tables in database one is Orders and another one is customers Orders Table Contains : OrderID , CustomerID and OrderDate Customers Table Contains: CustomerID , CustomerName , ContactName ...
0
votes
0answers
9 views

Django Auth user as well as custom users table?

So we've been using djangos database authentication for a while now and have recently decided we want to implement a completely new login system for our website. We are keeping the django ORM as we ...
0
votes
1answer
35 views

DDL doesn't work in MySQL master to master replication while DML can work?

I have two master in replication left master -> 5.5.47-log MySQL Community Server (GPL) rigth master ->5.5.47-log MySQL Community Server (GPL) "left master" mysql> create table test.left ...
0
votes
0answers
15 views

Grand read privilege to the user but is not allowed to grant the same privilege to another user?

i am a noob and this is how far i got so far, thanks and also how would you do it if you want to allow user to grant the same privilege to another user. GRANT SELECT ON DATABASE_NAME.* TO USER;
0
votes
1answer
54 views

Unable to install MySQL 5.7.12 in RedHat in a separate directory

I am trying to install the MySQL version 5.7.12 into RedHat in a non default data path. The installation syntax used /app/mysql/5.7/bin/mysqld --initialize --user=mysql --basedir=/app/mysql/5.7 ...
0
votes
0answers
19 views

AWS DMS creates tables with no auto_increment

I am migrating my databases to Amazon's RDS using their DMS tool. Pretty much everything looks great except that columns that were marked as auto_increment on the source database did not get marked ...
3
votes
2answers
38 views

SELECT other rows based on one matching row

I am trying to get related rows in a tag table based on one tag, where "related" means "having the same area_id". Example: tag area_id -------- ------- turkey 1 stuffing 1 carrots 1 ...
1
vote
2answers
18 views

MySQL Front - Workbench

We have MySQL Front installed in our server, I can connect to it with no problems, there is a db with tables, everything fine. Now I installed MySQL workbench (client) in the same server, but can ...
-2
votes
0answers
41 views

#1292 - Incorrect date value: '0000-00-00' [closed]

I refereed many question which having the title same as mine but has different approach and different issue so this question is not duplicate. I have a table in which column fm_sctrdate is date type ...
1
vote
1answer
16 views

database setup for posts table with multiple types

Struggling with how to set this up for speed and scalability. So basically i have a bunch of posts that depending on what type of post it is, it could have different input values that i would need ...
1
vote
1answer
56 views

Composite Primary keys and auto increment?

i'm developing SaaS app with multi-tenancy, and i've decide to use single DB (MySQL Innodb for now) for client's data. I chose to use composite primary keys like PK(client_id, id). I have 2 ways ...
0
votes
1answer
24 views

mysql Relay log file not found error while changing mysql data directory

I want to change data directory of my mysql server running 5.6.28 on centos 5.11. Its a slave to some master server. i have edited the config file ,moved the data contents from old directory to new ...
0
votes
0answers
14 views

Using MySQL session variables in a SSRS Report DataSet Query

I am creating a a SSRS report that connects to a MySQL database. In the DataSet I need to run a number of queries that load pieces of data in @SessionVar's that I can then piece together in the final ...
1
vote
1answer
62 views

Hoursworked/day computation via Bio Logs

This is my checkinout table: USERID CHECKTIME CHECKTYPE ------ ------------------- --------- 404 2016-02-12 07:24:03 I 404 2016-02-12 17:01:34 O 404 2016-02-15 07:24:21 I ...
0
votes
3answers
70 views

What is the performance impact of indexing a frequently updated column?

I just want to know if I'm doing this right. I've searched google for hours already and I can't find a straight answer. I have a table with potentially a very large amount of inserts and updates. Any ...
3
votes
1answer
53 views

Why would MySQL request a shared-lock after setting transaction level to READ UNCOMMITTED

Running a processing job in multiple parallel batches which basically reads big chunks of rows to update a few - it's OK here to use a lower transaction level since I know the relevant values won't be ...
0
votes
1answer
29 views

How to force MySQL master to overwrite the slave

We have a LAMP architecture website. Currently we have a production server running on the cloud and each developer has a complete copy of both the code and the database. Code is synced through Git ...
3
votes
3answers
64 views

How to format a phone number in a SELECT statement?

I have a database with table name student. I would like to display the register_number and phone_number of the student. The phone_number should be in the following format: +91-123-456-7890 and if ...
0
votes
0answers
35 views

Should I break up this MySQL table?

Existing table (more or less). It has about 1 million rows: id article title stage 1 zipfile name stage 1 delivery date stage 1 checked date stage 2 zipfile name stage 2 delivery date stage 2 checked ...
0
votes
1answer
29 views

Table of variable amount of skills for users

I am converting a Microsoft Access application into a website that uses MySQL, and I need to add a table into the database that holds a list of skills for each employee. There are a total of 35 ...
1
vote
0answers
52 views

MySQL is using swap memory while I have plenty of free RAM

I have a 6 GB buffer pool size for my database; however, mysqld process is moving to swap while there is plenty of RAM available. I think pool size and pages along with pool of reads and pool of read ...
1
vote
1answer
53 views

Cache query that is not stored in QueryCache

One of our Customers has an online-shop running xt-commerce 4.2. This version on the e-commerce-software has a very expensive Query for the category-tree. The query adds about 3 seconds delay and is ...
1
vote
2answers
17 views

Partial mysqlbinlog on latest binlog file

I'm trying to do a partial mysqlbinlog on the latest binary log file at a certain position therein (trying to extract just one query). mysqlbinlog --start-position=1234 --stop-position=1234 ...
0
votes
1answer
67 views

Delete query does not end

I have a following table with 1 million records : CREATE TABLE `activity` ( `id` int(9) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `subscription_id` int(10) unsigned NOT NULL, ...
1
vote
1answer
53 views

About count and or null

I am practising my MySQL in Leetcode and I've encountered this question: The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the ...
1
vote
0answers
46 views

MYSQL:[Note] InnoDB: page_cleaner: 1000ms intended loop took 4303ms. The settings might not be optimal. (flushed=396 and evicted=0, during the time.)

In MySQL5.7.11,the error log display the "[Note] InnoDB: page_cleaner: 1000ms intended loop took 4303ms. The settings might not be optimal. (flushed=396 and evicted=0, during the time.)" ...
1
vote
1answer
32 views

can't connect to mysql via command line but workbench works, ssh tunneling required

I am trying to connect to a mysql server running at B.edu. I want to connect via SSH tunnel. I first set this up in MySQL Workbench: Connection Method: Standard TCP/IP via SSH SSH hostname: B.edu ...
-1
votes
1answer
33 views

MYSQL - Select MIN integer in range A - B and is not C?

I have a simple table: CREATE TABLE IF NOT EXISTS `mytable` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data` VARCHAR(11) NOT NULL, `integer` int(11) NOT NULL, PRIMARY KEY (`id`) ); I need to ...
1
vote
1answer
41 views

What is the fastest way to insert data into MySQL memory table?

I need to insert 10M+ records into a MySQL memory table. A naive approach was to pipe records using shell, e.g. $ tail -10 ~/Desktop/test.sql INSERT INTO `test` (`a`, `b`) VALUES (4, 5); INSERT INTO ...
3
votes
1answer
54 views

When do MySQL DBA need root access

For a MySQL DBA, what operations require root access. I know that we need to be root for installation, starting and stopping services. With DBA’s not having root access, is there a way to perform ...
0
votes
1answer
51 views

Problems with queries [closed]

I have problems with queries in MySQL. Problem 1: Query: SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA="mysql" and TABLE_NAME="servers" MySQL says: #1054 - Unknown column 'mysql' ...