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

1
vote
0answers
6 views

SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

I have got this error message in Vesta Control Panel, in phpMyAdmin: SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs' SELECT `prefs` FROM `phpmyadmin`.`pma_table_uiprefs` ...
0
votes
1answer
11 views

MySQL - Many to Many Join. Left Join already Present

I am building a Attendance System for a Client and have become a tad stuck with JOIN's. I already have a left JOIN running, and want to add a JOIN on a many-to-many relationship but can't get my head ...
-2
votes
0answers
9 views

Percona Server, mysql problem TIMESTAMP

I got this little problem. In my mysql log error.log there is this line with a warning and I can't find what the problem is. 2016-02-08 19:58:35 0 [Warning] TIMESTAMP with implicit DEFAULT value ...
1
vote
0answers
18 views

Memory Table and Disk Table

I'm running a pretty big (or maybe I should call it SELECT-intensive) database. Now I've heard here and there that a MEMORY-based table is better for my situation (since I now run on a RAID1 HDD ...
0
votes
0answers
16 views

Retrieving most recent X rows for each given user from a table

We've got a seemingly simple query that's running extremely slowly, but I can't quite figure out the best solution to the problem. The scenario is as follows. We have an inbox table, which has the ...
2
votes
1answer
45 views

How to show rows with 0 without any records in database

I have a lot of record in my database and for data analysis, I need to show count of records for each day including days when I do not have any record, so result is 0. For example I have these ...
0
votes
0answers
14 views

Store massive values data from remote controllers

I implemented telemetry system in order to observe state of remote objects. Every object has a controller collecting data from some sensors (about 10-30 controlled parameters, lets take average value ...
1
vote
1answer
17 views

Create MySQL trigger that updates position of each row when sorted by a specific field

Let's see an example, I've got this table that contains teams, each of them having a certain number of points: CREATE TABLE teams ( id INT(11) NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, ...
1
vote
0answers
13 views

Improve performance of query with multiple group by column and count function in select

Brief Background of issue We have a aggregate table to store activities of competitors and this table have currently 3 Million activities and we need to retrieve data from this table group by ...
1
vote
1answer
26 views

Maximum possible memory usage over 100%

During these days I experienced several problems (delay and failed restart) on my database MySQL, so I tried with some help here around (and using Percona service too) to optimize my /etc/mysql/my.cnf ...
0
votes
0answers
3 views

What are the advantages of Packet Inspection and SHOW FULL PROCESSLIST over PERFORMANCE_SCHEMA?

We have several MySQL Servers (v 5.1) scattered across different geo locations. We are considering upgrading to the latest MySQL version as we heard a lot of good things about PERFORMANCE_SCHEMA ...
0
votes
3answers
46 views

Avoid using Many to Many Relationship

I have a 3 tables, Employee, Languages, Employee Languages. Now, Employee table is a profile table. Nothing special(Id, first name, last name etc.). Languages table has two columns: Language ID ...
0
votes
0answers
10 views

How to get (category specific) rank for all items (regardless of specific category) in one query?

I am attempting to use one query to get each servers rank based on the game that it is associated to, for all servers (regardless of which game they're associated to). However, I'm struggling to ...
0
votes
3answers
25 views

Getting error while starting mysql by just typing in mysql terminal

I am getting an error while starting mysql, by just typing mysql in the terminal: The error is: amtz@amtz-VPCEA23EN:~$ mysql ERROR 1045 (28000): Access denied for user 'amtz'@'localhost' (using ...
1
vote
1answer
23 views

Does innodb_buffer_pool_size accept “*GB” values?

I thinks innodb_buffer_pool_size is specified in bytes, would typing in values with unit (i.e 1024MB or 1GB) work? Has anyone already tried this? Specs: MySQL 5.6
1
vote
1answer
25 views

Taking load off the Master server by using a slave

My gameserver utilizes a Master and a slave on one server. The reason I am wanting to use a slave is because I want to beable to run select queries (read only) to get data without affecting the Master ...
0
votes
1answer
25 views

Every “INSERT” query check a combination of column's records

Unfortunately, my mind has stacked right now and i would like to design a really simple DB schema. What i want? In a simple table, for instance Table1, there are two different columns, Series and ...
0
votes
0answers
15 views

Problem connecting to MySQL using Ruby on rails

I'm using the MySQL command line tool, and I can successfully log into my root user. However, when I have created a new user, I can't log on with the command tool, but it works fine in the MySQL ...
0
votes
0answers
23 views

Sql multiple table checks for polling

I am implementing long polling using mysql for a near realtime data update for clients. Currently, this is what I have (and it works): A messages table, that holds messages between users,there is a ...
0
votes
0answers
24 views

MySql master stopped writing to binlogs when tmp partition full

Percona MySql version is : mysql Ver 14.14 Distrib 5.5.46-37.5, for debian-linux-gnu (x86_64) using readline 5.1 OS Version is : Debian 7.9 MySql master has a separate tmp partition, of ...
0
votes
0answers
10 views

In Database administration is there any proven advantages in using/choosing a MySQL IDE over another? [on hold]

Would it really matter if I would choose a MySQL IDE between Workbench, HeidiSQL or SQLYog? Does there any difference between how these IDE's has been implemented?
0
votes
0answers
5 views

how to change relay log fie name on “Adding Slaves to a Replication Environment”?

MySQL document advised that "new slave relay log file name " should followed the "old slave relay log file name" to avoid this problem, use the same value for --relay-log on the new slave that was ...
2
votes
2answers
53 views

Creating calculated column

I want to create a rating weight and I need do calculate AVG, then find COUNT and multiply both to get weight. I have something like that: SELECT post_id, COUNT(CASE WHEN vote > 0 THEN vote ELSE ...
0
votes
0answers
29 views

How to add a trigger on table create in Mysql

I want to apply a trigger on all tables if my database. I already created a script in PHP which will add triggers in all existing tables. But if any new tables are added in database, I have to run ...
0
votes
1answer
24 views

Could I set my InnoDB MySQL Server session state for SQL_SAFE_UPDATES and INNODB_FLUSH_LOG_AT_TRX_COMMIT?

Could I set my InnoDB MySQL Server session state for SQL_SAFE_UPDATES and INNODB_FLUSH_LOG_AT_TRX_COMMIT using MySQL Workbench's SQL Query window or MySQL Connection Navigator instead of in a c# ...
1
vote
1answer
49 views

Between optimizing a 1-billion rows table and dump-restoring it, which would be faster?

Have multiple tables which had more than 1 billion rows. Archived and deleted many of them, now want to recover the disk space. Have option to either optimize the table, or dump the table and restore ...
4
votes
1answer
16 views

Checking for fields not on SET clause on before update trigger on MySQL

I want to set a before update trigger that sets a column to a given value if an update query is done and that column has no new value on the set clause. The table I'm using. (Sort of) DROP TABLE IF ...
0
votes
0answers
29 views

MySQL Errror “Cannot Connect Invalid Settings”

I was working with mysql using phpmyadmin on a local server and when I clicked on a table it took a very long time to do anything so I let it do its thing, I walked away and when I came back I had the ...
0
votes
0answers
8 views

mysqlworkbench nasty result grid with text columns

On MySQL Workbench 6.3, when you query a table with text columns that have carrier return \n in it, the Result Grid expands record's height accordingly. In the image, I've reduced the height of the ...
1
vote
2answers
25 views

Interested in counting number of threshold crossings

I would like to determine the number of times that a value has crossed a threshold in either direction in a specified time frame. As an example, lets say that I am interested in the number of times ...
0
votes
2answers
32 views

Spanish characters saved incorrect in Mysql

I have googled this already, but I couldn't find what's wrong in my situation. I have a wordpress site that has a lot of non-english users which type in words such as "español" it is printed ...
1
vote
0answers
46 views

Is there a way to throttle MySQL requests to mitigate DoS traffic?

I've a server with ~200 wordpress websites hosted. When Google Favicon bot pays us a visit it searches all the sites indexed on our IP, that means it's requesting ~200 favicons. Most of the sites ...
1
vote
1answer
38 views

Mixed based replication between two databases on the same server

I have two apps with a current configuration as follows: App1 DB on server A/MySQL Instance A App2 DB on server B/MySQL Instance B Students can apply for internship using App1 and those ...
1
vote
0answers
49 views

MySQL 5.6 Performance Tuning Issue

I have read and try lots of things about MySQL optimization and tuning. I tried most of them one by one according to our needs but nearly I got nothing. I am doing my test using some simulation ...
1
vote
1answer
39 views

MySQL Database Instance size

We found 3 different size of a MySQL Database Instance as follows: Mysqldump output Data directory size (even if we exclude size of bin-logs,error-logs) SUM (data_length + index_length ) ...
3
votes
1answer
30 views

Passing multiple value for a parameter in my sql

I have written the query below: SET @City = 'London,Lyon,Kln'; SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@City, ',',@r:=@r+1),',',-1) City FROM (SELECT @r:=0) x, (SELECT 'x' xx UNION SELECT ...
1
vote
1answer
37 views

Does varchar(n) affect the number of records which can be stored per page even if you store less than n?

I'm struggling to find enough documentation to help me answer my own question. The common story seems to be that it doesn't make a difference to actual database size when you use a much higher value ...
0
votes
2answers
25 views

ulimit 'open files' and MySQL max_connection

When running mysql on SSD, does max_connections, if set more than the kernel's ulimit open files, be limited to the kernel's limit? My understanding is that if the kernel's ulimit open files is 1024 ...
1
vote
1answer
38 views

How do I stop tables from being created in my mysql database?

I have noticed recently that some tables are being created in my mysql database by a rogue process. These tables typically have six letters followed by 32 (e.g. ernidt32). They just have one column ...
2
votes
1answer
45 views

Can I use an index to optimize select clause, versus where clause?

I'm not sure if this question has been answered, because I'm not sure of the proper wording to describe what I need. So here it is: I am trying to optimize a database that is running very slowly, ...
0
votes
0answers
21 views

Access a remote mysql from a remote node application

I'm approaching MySQL for the first time in life. I have a machine with a MySQL and Wordpress environment correctly working (let's say at 1.1.3.4) but I want to access it from a remote node.js ...
2
votes
2answers
45 views

Is better to create a table for each room or make a single table that handles all the rooms in my case?

I need to make a server-side for iOS and android application that does something similar to chat(Is not really a chat), and I'm a PHP and MYSQL newbie. The process is that 2 users join a room and do ...
-1
votes
0answers
14 views

Discriminating rows where column start and/or end with dots

I have a table where rows are stored as follow: # id alias_desc state 1 3 Alison a 2 4 Alison. a 3 5 Alizon a 4 6 Alizon. a 5 7 Amada a 6 8 Amada. ...
1
vote
1answer
25 views

Where does MySQL's “show slave status” information come from?

two files "master.info" and "relay-log.info" were deleted after I "reset slave" I want to know why slave information still exists ~ confused >_< I think it shouldn't display any message about ...
2
votes
3answers
58 views

Remove duplicates in sequence based on keys

I am looking to remove duplicates on a row by row comparison based on keys Member and Group and data sorted ASC on Member, Group and StartDate. Just return the records in the select query and not ...
-2
votes
0answers
13 views

why database show vulnerable column when i give a wrong parameter in query? [on hold]

When we try for inject a website for find vulnerable column then sometimes we need to give a wrong value in the website parameter. Like www.vhul-web.com/index.php?id=1 union select 1,2,3 -- - Now ...
1
vote
0answers
36 views

InnoDB AUTO_INCREMENT resetting itself without MySQL restart

We've recently noticed the following scenario happening in many of our databases: A record is inserted, and receives an AUTO_INCREMENT primary key. The record is deleted. Another record is inserted, ...
0
votes
0answers
28 views

Replication Error_code: 1032

I an unable to fix this as I don't know what cause this error. Replication was stoped for maintenance activity and after completing the maintenance we started it and then after some point the ...
0
votes
1answer
14 views

Does Mysql locks table while insert operation

I am using Mysql(INNODB) and does Mysql locks table when I do some insert operation? I have a huge table and it has lots of indexes. I do some research and Mysql doc says INNODB only locks rows not ...
1
vote
1answer
30 views

Design database -

I want to create database. I have two kind of clients which admins and employee should communicate with them ; Customers and Manager. I'm not sure about which place employee's place on database. is ...