MySQL version 5.5 - please also tag with mysql for search purposes.

learn more… | top users | synonyms

4
votes
2answers
342 views

Is it a waste to set innodb_buffer_pool_instances greater than the # of CPUs?

I set the innodb_buffer_pool_size to 20GB on a server with 12 CPU cores. My full database is 11gb, however most of it is archived tables that are almost never used. The total queried data is around 3 ...
0
votes
0answers
19 views

Can't connect to MySQL server via SSL

I'm trying to connect to a MySQL server via SSL. I know the server is set up correctly to handle SSL connections because I can connect fine using MySQL workbench, PHP, and command line MySQL client ...
0
votes
2answers
32 views

MySQL SELECT n-th row between dates (time interval)

I have a server which records various sensor data each second and inserts it into a MySQL table. To view the sensor data on a dashboard I have a chart which also gets updated with live data each ...
0
votes
0answers
22 views

Trigger query fails to execute because of local variable

I have the following table: |-------------------------------------| |Column |Type |Null|Default| |-------------------------------------| |//**id**// | bigint(11) | No | | |soldier_id ...
0
votes
1answer
401 views

How to restore data after MySQL Upgrade?

I upgraded from MySQL 5.5 to 5.6 by uninstalling 5.5 and then installing MySQL 5.6. Now that MySQL 5.6 is running, none of my DBs or data is present/visible in MySQL Workbench. I also see that I ...
1
vote
2answers
37 views

Counting rows from a subquery

Simple: I would like to count the number of rows from the sub-query. Note that status is whether the host is online or not. Bad code SELECT COUNT(ip_address) FROM `ports` ( SELECT DISTINCT ...
3
votes
0answers
1k views

Why is loading data into MySQL cluster taking so long?

I have a mysql-5.5.22 ndb-7.2.6 cluster 64bit running on Centos 6 with each node installed on the same Citrix Xen Server communicating via a virtual private network. Each node has 4GB of RAM, 4 vCPUs ...
0
votes
1answer
2k views

Following mysqltuner suggestions: query_cache_size and join_buffer_size

So I am following the suggestions of mysqltuner, and so far I've had great results, the server is performing well (dedicated VPS running a large Magento eCommerce store) There is only two issues left ...
2
votes
2answers
8k views

Unable to drop the table since its showing waiting for meta data lock

We are trying to drop one table but it's getting hanged, and when we see the 'SHOW PROCESSLIST' command it's showing as 'waiting for meta data lock'. Even we are unable to perform any operation on ...
1
vote
2answers
37 views

can't I use Current_timestamp as default value in mysql 5.5.47-cll

I am not able to set Current_timestamp as default value. My Mysql version is 5.5.47. Query is ALTER TABLE `downloads` ADD `date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ; While it is working ...
1
vote
1answer
41 views

Incorrect backup size

We are storing our everyday full backup in remote storage. Everything seems to be working fine, but every seven day interval the archived folder size is much more than the everyday archived backup ...
1
vote
0answers
270 views

Records not getting replicate from Mysql 5.5.32 to MySQL 5.6

I have a MySQL 5.5.32 server (community edition) on one Linux server which is master. I have a MySQL 5.6 server (community edition) on another Linux server which is slave. I have installed various ...
0
votes
1answer
44 views

Select rows with most recent date for the given date

I have a table to manage the stock which looks like below product batch qty date Grape BAT0 42 10/3/2016 Apple BAT1 12 11/3/2016 Banana BAT2 15 11/3/2016 Orange ...
1
vote
1answer
34 views

MySQL allows records longer than varchar(N)

We have a database with a field of type VARCHAR(255) but in it I can see some records having a length of larger than 255, such as 264. How can it be possible? Can it be that the database is corrupt? ...
2
votes
2answers
46 views

How to get month name from week number and year [closed]

I have a week number and a year (e.g. 34 and 2015). I want to get the name of the month to which the specified week belongs. How can I do that?
0
votes
1answer
152 views

change character set in mysql permanently

I want to change following parameters to utf8mb4 so that mysql can store emoji characters and special language characters. but when i try running following statements one by one SET ...
1
vote
1answer
233 views

SQL query to compute longest travel time for each id number

I am a novice in SQL and I have a problem as follows. There are two tables TRNSCTN_TAB: CREATE TABLE TRNSCTN_TAB( `transactionId` int , `UniqueId` int , `transactionTimeStamp` ...
0
votes
1answer
897 views

Change MAMP to use a lower Mysql 5.1 version

I need to have the same development environment for my PHP program. My clients test server is running on Mysql 5.1 while my local is using MAMP running Mysql 5.5. How do downgrade my mysql database ...
0
votes
2answers
73 views

Mysql slave use more memory than master server

I have used top command to check memory usage on both mysql master and slave server. Master is using only 12% of allotted memory but slave is using 82%. configuration wise both are same. can anyone ...
1
vote
1answer
46 views

MySQL. Capture Cis program makes incorrect query: SELECT DISTINCT “PartType” FROM “Capacitor” ORDER BY “PartType”

I am having problems to get one database running. I have a MySQL in my server, the server is running "5.5.48-MariaDB - MariaDB Server" with "UTF-8 Unicode (utf8)" I have a MySQL ODBC 64 bits 3.51 ...
0
votes
1answer
12 views

What configs influence whether user credentials/grants are written to the binlog in Mysql

I have a fairly trivial master-master setup. When testing this setup I see that mysql users are binlogged and replicated on slaves. However on each of the masters the binlog-do-db* is for a specific ...
0
votes
0answers
20 views

MySQL 5.5 client SSL connection only works when adding cipher list argument, why?

I set up the packaged MySQL server 5.5 and client on two Ubuntu VM. I configured the server to support SSL. I can connect to the server with the MySQL CLI tool between the VMs, but the connection is ...
0
votes
0answers
46 views

EXPLAIN SELECT query is writing to tmp table

I am getting a "copying to tmp table" when running an EXPLAIN SELECT on a query. This is a pseudo-query showing the structure of the query (I can't post the actual query): SELECT colA , colB , ...
3
votes
2answers
259 views

View active MySQL connections per user

I need a query that will give me the active or open number of connections to a certain database for a certain user. I have been searching for hours and have come up with nothing so far. I am close, so ...
1
vote
1answer
31 views

Altering a large table to INNODB

I have a table of 4GB(18 Million Rows) in MYISAM Engine on one of my slave server, and I want to convert it to INNODB Engine, the server is replicating from a master. I tried to use the ...
2
votes
3answers
712 views

Rolling count of total transactions over time

I need to get a set of total transactions over time on a weekly interval. Essentially I need a total-transactions-to-date column. When I group by WEEK(Date) I get the amount of transactions for that ...
0
votes
1answer
17 views

Slave (SQL thread) replicates very slowly

See this video: https://mckay.media/Yxjp2 I have two MySQL replication slaves which are replicating from the same master. Both slaves are running on identical hardware. Each has its data directory ...
1
vote
3answers
172 views

MySQL database uses too much CPU

I have a MySQL database which uses too much CPU. I am actually performing benchmarking to the web servers which queries the database. Right now the database is being the bottleneck, it uses too much ...
0
votes
0answers
54 views

SQL Timeout when updating specific rows that goes away when other columns are updated

The data I'm going to provide won't be very complete, so I apologize in advance for that, and will happily supplement with more on request. I mostly just don't know where to begin looking, and don't ...
6
votes
3answers
22k views

Difference between On Delete Cascade & On Update Cascade in mysql

I have two tables in MySQL database- parent, child. I'm trying to add foreign key references to my child table based on the parent table. Is there any significant difference between ON UPDATE CASCADE ...
0
votes
0answers
13 views

Default Space in WAMP

What is the Default Space for MySQL in WAMP SERVER? We are using MySQL as the back-end for our application development, and it is running out of space. How can we increase the disk space? Or are ...
4
votes
3answers
6k views

“Could NOT find Curses” error when installing MySQL from source

I am installing MySQL Server from the source distribution which I downloaded from: http://dev.mysql.com/downloads/mysql/#downloads. I have downloaded the file (mysql-5.5.19.tar.gz). I am using ...
0
votes
1answer
27 views

What are the side effects of changing MySQL `character_set_server`?

I am having some strange issues with character sets on my system. After digging through all kinds of settings, I found a discrepancy in my character set settings. When I run show variables like ...
0
votes
0answers
26 views

begin end block in MySQL

I have a compound statement of begin end block consisting of some SQL statement as mentioned below. lab_name: BEGIN truncate table table_name; insert into table_name (a,b,c,d,e,f) ...
0
votes
1answer
63 views

sql_safe_updates set to ON by default

This is fresh mysql install from Debian apt. mysql> \s -------------- mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3 .. Server version: ...
0
votes
0answers
74 views

MariaDB: Can't connect to MySQL server on '127.0.0.1' (107)

What does it mean the error 107? Can't connect to MySQL server on '127.0.0.1' (107) I haven't found this error in any documentation: https://mariadb.com/kb/en/mariadb/mariadb-error-codes/ ...
0
votes
1answer
27 views

Is it safe to “FLUSH STATUS” in mysql?

We have deployed REDIS to hold some frequent query result to reduce number of connections made on Database server. We need to find out Max_used_connection after deploying REDIS. So we plan to reset ...
6
votes
1answer
102 views

Non-grouping field error with ONLY_FULL_GROUP_BY mode and tables that have the same column name

I'm finding that MySQL seems to have an issue when ONLY_FULL_GROUP_BY mode is enabled and the query includes a HAVING that refers to grouped columns from different tables that have the same name. ...
9
votes
4answers
7k views

How costly is opening and closing of a DB connection?

How CPU intensive is opening and closing of a DB connection (for a web app) in MySQL ... when the DB software is on localhost? ... when the DB software is on another machine?
0
votes
0answers
60 views

Optimize MySQL JOIN Query

I've been using following Query to fetch data from MySQL. SELECT SQL_CALC_FOUND_ROWS DISTINCT (wi_individual_g.ind_id), wi_individual_g.ind_id, wi_individual_g.ind_name, ...
4
votes
1answer
10k views

How do you tell which host is close to being blocked in MySQL?

I have a two part question: In cases were this error comes up, is there a way to see if a host is close to being blocked? And fire off an alert? PDOException: SQLSTATE[HY000] [1129] Host `hostname` ...
2
votes
2answers
5k views

How to COUNT number of rows with LIMIT?

I want to catch X rows, thus, I set LIMIT X; but how can I simultaneously count the total number of rows too? Currently, I use two separate queries to do so as SELECT COUNT(*) FROM col WHERE CLAUSE ...
1
vote
3answers
217 views

Mysql 5.5.45 crashing after refreshing web page rapidly(Too Many Connection warning)

I am using ec2 aws instance for my wordpress webiste.after every 5 to 10 minute and randomly my website going down i tried lots of things like increasing buffer memory ,memory limit but that not ...
0
votes
0answers
42 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 ...
9
votes
2answers
10k views

MySQL equivalent of WITH in oracle

Is there a MySQL equivalent of the WITH clause in Oracle?
0
votes
0answers
33 views

Is double one to many a bad design? It looks duplicate when joining both one-to-many tables

Suppose I have user table, book table, DVD table. User can borrow n book, n DVD at the same time, a book or a DVD can be borrowed by a user. (I understand it is many-to-many situation in real life, ...
0
votes
0answers
40 views

Mysql Replication break Error_code: 1032

Created new slave replication, it was working fine but suddenly after 2 days its giving me this error and the replication stopped. Both on Centos 6.7 Master Version ...
3
votes
1answer
110 views

MySQL replication - invalidating query cache entries (table)

We lately moved to MySQL V5.5 on CentOS release 6.7 with master and 2 slaves. Since then the replication process lags a lot behind the master with the line in the process list of: invalidating ...
0
votes
0answers
21 views

MySQL replication Got fatal error 1236

I am getting this error when starting a new slave replication from master. Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded ...
0
votes
1answer
77 views

Restoring MySQL dump ERROR 1449

I took hot backup (dump) from my Master MySQL DB with below command mysqldump -uroot -p --skip-lock-tables --single-transaction --flush-logs --hex-blob --master-data=2 -A > ~/dump.sql ...