MySQL 5.5 brought many performance enhancements and expanded the feature set of the popular open-source RDBMS.

learn more… | top users | synonyms

0
votes
0answers
6 views

Is there an easy way to update a mysqldump file from version 9.11 to 10.11?

We have a client that has had their servers for soo long, they were still running MySQL 4.0.24. Now that they are refreshing their servers, we took a mysqldump of their current database to put into ...
4
votes
1answer
25 views

MySQL overhead of calling a Stored Procedure

Within Java, we access MySQL (v5.5.40) via JDBC -- a prepare statement, setting parameters then calling the stored procedure. It appears that every execute() has the overhead of 4 meta-calls (per ...
0
votes
0answers
13 views

How to make an indexed search over a list (set)?

A follow-up question for How to most efficiently store possible combinations of categories? An answer pointed to SET datatype. As far as I know, the default search option for it, FIND_IN_SET, doesn't ...
0
votes
1answer
13 views

manual transfer fails with table does not exist

I performed a manual transfer of data manually (zip up the dir and rsync'ed it over. I moved the members.ibd (the only .ibd file) to a save place, extracted and then replaced members.ibd with the ...
5
votes
2answers
721 views

Why are mysql password hashes internally saved with a star (asterisk)?

I was reading upon some mysql internals, when going through the mysql.user table in the my mysql shell, I get mysql> select * from mysql.user limit 1 \G *************************** 1. row ...
0
votes
2answers
33 views

How to most efficiently store possible combinations of categories?

I have a table of categories (currently with 14 rows, not likely to change). A need to cache combinations of categories emerged, so I'm creating a table of allowed combinations (only few hundreds of ...
0
votes
1answer
9 views

How to store list data in our LMS?

I am looking at how we can store list information in our database. The example in question is regarding products. For every employee there will be a primary product and as many secondary products as ...
0
votes
1answer
12 views

Import lots of mysqldumps with missing CREATE DATABASE

I have a bunch of mysqldumps of my old server with one database each. Unfortunately we forgot to add CREATE DATABASE ... in all those dumps. How can I import those files in one batch?
0
votes
1answer
31 views

Error: Incorrect usage of UNION and ORDER BY

I have this query: SELECT DISTINCT CONCAT (MONTH(`Date`),'-',YEAR(`Date`)) from wp_result_plugin WHERE Bet=2 AND month(`Date`) = EXTRACT(month FROM (NOW())) ORDER BY MONTH(`Date`) ASC UNION ...
0
votes
1answer
16 views

mysql database under symlinked directory: ERROR 1018 (HY000): Can't read dir of './<dbname>/' (errno: 13)

I'm using mysql 5.5 on an ubuntu linux server. I need to move a database from its current location (under /var/lib/mysql) to a disk with more space, so I attempted to move the directory and create a ...
0
votes
1answer
18 views

Can combine five mysql statements into just one statement?

Can I combine all the five statements into just one statement? update mytable set myfield1 = replace(myfield1, '…' ,'-') ; update mytable set myfield1 = replace(myfield1, '‖' ,'|') ; update mytable ...
0
votes
0answers
23 views

IF statement inside stored procedure, seems to cause locks by side effects

We are running a MySQL 5.5. server with READ-COMMITTED transaction level to store and process a large time series dataset. We have a large time-series-table, into which we write batch updates every ...
0
votes
0answers
6 views

Optimizing MySQL for write throughput ceiling

We have a large MySQL database on AWS RDS, with a huge table around ~1.8TB with massive write workload. We recently hit a write throughput bottleneck, which caps our provisioned IOPS way below the ...
0
votes
0answers
10 views

creating best results from two tables

I have two tables, one is the results of an assessment from users(per row) and column starting with 819....X1 represents the qid. The other table holds the score for the answers (A1,A2,A3), both are ...
0
votes
0answers
27 views

Tunning MySQL Variables

we have a dedicated mysql server with 10 CPU and 32G of memory After doing some readings came up with those configs : # This was formally known as [safe_mysqld]. Both versions are currently parsed. ...
0
votes
2answers
28 views

Get rows where lastLoginTimestamp is in last 7 days

I'm trying to get the rows from a table where lastLoginTimestamp is in last 7 days and I'm doing as follow: SELECT * FROM representative WHERE DATE_SUB(lastLoginTimestamp, INTERVAL 7 DAY) ...
1
vote
1answer
18 views

phpMyAdmin and mysql not showing the same database

I have setup WAMP which I managed by using a tutorial and everything seems fine... I am logging into mysql as the root user with full privileges granted and I am able to create databases in mysql and ...
0
votes
1answer
30 views

MySQL Crash After Starting Binary Logs

Recently I have added binary logs to mysql to start replication but after that setting, mysql process failed to start and keep crashing constantly. In mysql error logs some messages are there but not ...
0
votes
1answer
24 views

Unable to get the latest value added to Mysql table based on posted time

SELECT * FROM discussion_comments GROUP BY disc_id ORDER BY posted_date DESC I have table example like given below: CREATE TABLE example ( id int(11), cname varchar(11), posted_date date, ...
0
votes
0answers
39 views

MySQL is pretty slow after 50-100k rows whats happen?

i have trying now a lots of time, and i try to find a way there make sense to find out of my problem, but this problem stil make a lot perfumes issues. i testing it of on a developer server ( 2 ...
1
vote
1answer
14 views

Installed Percona-Toolkit, but no sign of xtrabackup

I've installed Percona-Toolkit on my Debian (Wheezy) test Server, using dpkg -i percona-toolkit.deb apt-get install --fix-missing -f dpkg -i percona-toolkit.deb However, there is no sign of ...
0
votes
1answer
24 views

“show procedure status” displaying the non existing databases stored procedures in mysql server

i have taken a mysql server backup using mysqldump and imported the backup file in another mysql server.Import failed because of disk full issue. Only 11 databases are created out of 15 . when i issue ...
0
votes
1answer
25 views

No records in Mysql.func table even though there are stored functions in server

When i am creating a user defined function in one of my mysql server, it's not creating any row in mysql.func table . Even though i have multiple functions in my mysql server , this table is empty . ...
0
votes
0answers
17 views

How to create relations in database

I have two table: users and projects. In projects admin can add projects like: web design, SEO , etc.... I need to add abilty to admin can add some users to certain project... For example I need ...
0
votes
0answers
23 views

Mysql Trigger to call a java method, its pros and cons?

I have a requirement to call a Java method once a new record has been inserted in to the DB. I would like to know is it a efficient way to do ? what could be the performance issues as my table expects ...
1
vote
1answer
36 views

Warehouse Database Design Question

Apologies if this has been answered previously but I have been unable to get a specific model to work. I have a database table that needs to store some very basic info for a reporting system. The ...
0
votes
1answer
31 views

How to turn Event Scheduler On permenantly in mysql

How do i turn on the event scheduler in mysql permanently. I'm using phpmyadmin and i have scheduled an event to copy records from one table to another everyday at a specific time, but the records are ...
0
votes
1answer
46 views

MySQL: How to write a recursive function to show menu tree?

I try to build a menu tree inside the SQL with this function: DROP FUNCTION IF EXISTS hello_world; DELIMITER $$ CREATE FUNCTION hello_world(_typeId INT, _typeText TEXT) RETURNS TEXT BEGIN ...
0
votes
0answers
10 views

MySQL 5.5 only use 1 thread and 30% cpu

i have a big issue, every day i need to update or insert like 3.3 milion rows, i have trying to do what ever i can but it still only run like 605 query/s i use VirtualBox so my setup are testing on 1, ...
0
votes
1answer
38 views

mySQL running on 100% CPU both on RDS and EC2

How do we troubleshoot an issue with Amazon wherein my database queries (PHP/MySQL) are eating 100% CPU most of the day? Traffic=200 connections average mySQL version = 5.5.40 The ...
2
votes
1answer
52 views

mysqldump doesn't restore database. why not?

Why doesn't my restore operation work? I created a dumpfile for a database using: mysqldump -u root -p databasename > /home/databasename_bkup.sql I then opened the dumfile and confirmed ...
0
votes
1answer
95 views

Table Design for Student Attendance hourly for each day

I have created a table(attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly(1-8hrs) for every day. I have the student details in separate ...
3
votes
0answers
55 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
1answer
31 views

Slow query while selecting a higher offset from millions of rows

I have sort of security log files containing millions of rows. On my current testing I imported the data for one month which is the sum of ~14,000,000 records. The table contains several set of fields ...
0
votes
0answers
17 views

Alternative to using subqueries

Anyone please help me to optimize this query SELECT COUNT(csd.search_id) AS searches,count(distinct cd.cust_phone) as unique_searches, (SELECT COUNT(csd.product_type) FROM ...
0
votes
0answers
150 views

Centos 5.11 mysql-server 5.0.95 upgrade to mysql55w-server

Here's my thought process on my upgrade: mysqldump --all-databases > backup.sql service mysqld stop yum remove mysql mysql-server yum install mysql55w mysql55w-server service mysqld start ...
0
votes
1answer
25 views

MySQL - Is it possible to assign permission to count the number of tables in a database without permissions on individual tables?

As part of a script I am trying to count the number of tables that exist in a particular MySql schema. Using my own user I am using the query SELECT COUNT(*) FROM information_schema.tables WHERE ...
1
vote
0answers
21 views

Does creating an empty table in MySql have any effect(downtime) on production?

Disclaimer: I am, in all probability, paranoid about pushing a patch on a production server. The patch alters the schema, by creating a new table (which is empty), and changes some stored procedures ...
0
votes
1answer
39 views

How to only display a variable in PHP inside a MySQL query when it has a content or when a condition is true?

How do I only display $mon or any variable when it has content? whenever i use this syntax and for example, monday must contain the number 1 and tuesday would contain number 2 and the other ones have ...
1
vote
2answers
44 views

Need to convert date to word using trigger

I have created a datetoword function in Mysql. Checked the function working fine. Now using this function need to convert the date from field1 (date-datetype) to field2 (Varchar-datatype) within the ...
0
votes
0answers
27 views

Different Auto-increment values Mysql schema Replication

I have 6 Slave set up (EC-2, linux) and a Master ; 2 schemas getting replicated. Version info: mysql Ver 14.14 Distrib 5.5.34, for Linux (x86_64) using readline 5.1 Once in few months in one of the ...
0
votes
1answer
39 views

Large query with subquery runs indefinitely after mysql update

We recently did a big server update, in the process migrating from mysql-5.0 to 5.5.40 Several of the queries, which had been running well on the old server, now grind everything to a screeching halt. ...
1
vote
1answer
50 views

Can MySQL log lock waits?

Is it possible to have MySQL log queries or transactions where lock waits occur? One can debug specific application errors generated from lock wait timeout errors from the DB but without the ability ...
0
votes
1answer
129 views

MySQL always writes simple temporary/memory tables to disk (both tmp_table_size and max_heap_table_size are set to 8GB)

I'm struggling with this issue and just can't figure out why this is happening. CREATE TABLE sitecache._test ENGINE=MEMORY SELECT * FROM website.gallery_likes WHERE 1=0; Every time I execute this ...
0
votes
0answers
26 views

Use join to aggregate data from various normalized tables

I have a database as follows: tbl_clients (Primary Key: client_id, Foreign Keys:place_id,district_id,zone_id,country_id) tbl_places (Primary Key: place_id) tbl_districts (Primary key: district_id) ...
0
votes
1answer
60 views

Add linked server from SQL-Server to MySQL: “Data source name not found” (Error:7303)

I'm trying to link my SQL-Server 2005 on Windows Server 2008 R2 with MySQL 5.5.40 on a different computer. I have followed this guide: ...
1
vote
1answer
33 views

Purge mysql log bins older than two weeks automatically

I have to manually write purge binary logs bin to "mysql-bin.somenumbers" ; Once in a while, I need to reduce the spaces that binlogs are taking on my web server. Is it possible to purge binary ...
1
vote
1answer
45 views

MySQL Data Files Missing?

We are upgrading our website and I was checking on the size of the new database compared to the old one and was really surprised to find that in the /var/lib/mysql/ directory, the only files there ...
1
vote
1answer
32 views

Mysql Master-Slave replication catchup and bin_logs

I have set up MYSql Replication using 2x 128gig ram 24 core cloud servers. we have a massive live database that cannot experience down time due to the high volume of data input. I have found while ...
0
votes
1answer
27 views

how to overcome these type of issues where null value inserted into primary key not null column in table

how to overcome these type of issues where null value inserted into primary key not null column in table