MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
8 views

MySql - unique key not working

I have the following table: CREATE TABLE `timeline_lists` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `list_type` int(11) NOT NULL, `s_object_id` int(11) NOT NULL ...
0
votes
0answers
8 views

MS Access using MYSQL database and error in SQL (memo, hyperlink OLE)

I have a SQL statement that works fine in MYSQL workbench but when used in Access it produces a "invalid Memo, OLE or Hyperlink Object in subquery 'custom_values.value'. SELECT ccr1.value, ...
-2
votes
0answers
16 views

The best my.cnf for my AWS server

I have an amazon server , my mysql is very slow , i dont know what is the best configration for my server , i need to big caching system for improving my website speeds, it's my config : my.conf : ...
0
votes
1answer
11 views

innodb fulltext ibdata1 size

I am running mariadb 10 and have a large innodb table with a full text index. I have innodb_file_per_table=ON I've noticed though that the ibdata1 file grows at the same rate as my table file. I ...
0
votes
1answer
28 views

AND operator in ORDER BY clause

While debugging some code, I stumbled into an error pretty much like the following: SELECT * FROM person WHERE family_size > 3 ORDER BY birthday AND registered=0; The error is that the AND ...
0
votes
0answers
12 views

How to fix my SQL database

I have recently moved a WordPress blog into a new servor which has these caracteristics : debian, mysql 5.0.51a-24, 16GB of ram. The mysql crashed regularly with this log info: Feb 8 12:17:14 ...
0
votes
1answer
5 views

mysql replication - missing table for foreign key on slave

i have the following situation: We're running a simple master slave replication with table filters, so the slaves doesn't have all the master tables. Master has table A with FK to table B Slave has ...
0
votes
0answers
17 views

MySQL event scheduler doesn't work

I have the following MySQL event sheduler to udpate some values in RECETAS table's ESTADO column. I want to run it everyday at 10:05:00. CREATE EVENT IF NOT EXISTS actualizar_prueba ON SCHEDULE ...
1
vote
1answer
15 views

Innodb issue is preventing MySQL from starting

For some reason mysqld refused to start after I rebooted my server. Now when I try to start it I will get the following error: [root@vps1 ~]# service mysqld restart ERROR! MySQL server PID file ...
1
vote
1answer
16 views

Binlog not consistent between slave and master

Initially I don't see binlog on slave is updating. Today I discovered and add log-slave-updates option to slave, now it is updating. However, the filename does not match between slave and master. ...
0
votes
0answers
16 views

Best Mysql Performance Booster for Large Datawarehouse

What are the most effective and efficient ways to improve the performance of mySQL DB hosting a large Datawarehouse. Please suggest the best methodologies and performance tweaks that should be there ...
0
votes
0answers
23 views

What is the best way to execute a MySQL script periodically on Linux

I want to execute some SQL everyday in a Linux server using MySQL to UPDATE some column's values. In order to do that I use the UPDATE ... SET ... WHERE ... statement. I want to know which is the ...
0
votes
0answers
20 views

MySQL SUM with multiple GROUP BY on same table

What is the best way to produce several sum results based on different group by conditions on the same table in MySQL? I believe I'm doing a bad select, but I can't figure out a better way. Imagine ...
0
votes
1answer
19 views

Dynamic my sql error

I am below error when i try to execute procedure. delimiter $$ USE `Test`$$ DROP PROCEDURE IF EXISTS `DYNAMIC_MYSQL`$$ CREATE PROCEDURE DYNAMIC_MYSQL() BEGIN DECLARE DONE INT; DECLARE CHECKNUMBER ...
0
votes
1answer
37 views

Friendship and Messages in a MySQL table relational schema problem (concerning big data manipulation)

Before you start suggesting this question for duplicate read it, I have searched and i haven't found any proper solution. So, i'm building a social networking site (I know that you are laughing ...
0
votes
1answer
13 views

MySQL stress test tool, remote server preferred

For MySQL stress test there exists programs: http://dev.mysql.com/doc/mysqltest/2.0/en/test-programs.html Also mysqlslap exists: http://dev.mysql.com/doc/refman/5.5/en/mysqlslap.html Is it possible ...
2
votes
2answers
35 views

High MySQL “InnoDB Writes Per Second” - Can't see the queries?

On our live MySQL 5.5 database server, we use MySQL Workbench for running manual queries, checking running queries to see what's going on, etc. I noticed today that on the "Server Status" tab there's ...
1
vote
1answer
14 views

Small startup: Cassandra + Hadoop or ElasticSearch

To give some context, I am from a small start up (4 team members) and we work in the education space. We've developed an e-learning platform that several schools are already using. We currently have ...
0
votes
1answer
23 views

Explain doesn't show indexed column as key

Consider the following table structure CREATE TABLE `games` ( `game_id` bigint(20) NOT NULL AUTO_INCREMENT, `players_no` tinyint(4) DEFAULT NULL, `startedon` datetime NOT NULL DEFAULT '0000-00-00 ...
1
vote
1answer
19 views

How do i increase the total MyISAM indexes?

I have just made a check for my server with mysqltuner. -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB +Federated +InnoDB -ISAM -NDBCluster ...
3
votes
1answer
29 views

is it possible to do a reverse pattern search in a database?

I have 2 database tables with rows containing strings. If I combine two strings, one from each table, as input I need to be able to find where the parts of the strings are located in each table. For ...
0
votes
1answer
18 views

MySQL order of query

My query return like this. 12 14 14 99 78 78 54 I want result to be sorted so that no same number comes consecutively in the result. The result that I want is like this. 12 14 99 14 78 54 78
0
votes
1answer
7 views

How to check mysql password change and other events logs

Recently someone change my phpmyadmin password and drop database I think it was sql injecting. Now I want to find information about this like when, how and who change my password Please tell me ...
0
votes
1answer
14 views

Does the keyword NEW have the per-connection basis aspect to it?

I am watching a mysql table with an after insert trigger and i have started to receive many inserts.I am using NEW.message to get the last inserted message. Since i am receiving many inserts from ...
0
votes
1answer
20 views

What to monitor (key indicators) for MySQL server

I have installed Munin for monitoring my MySQL database server. It enabled a large amount of MySQL plugins out of the box. Since running these plugins can be CPU expensive I want to limit them to the ...
1
vote
0answers
30 views

Combining fields to make a unique record or keeping them separated

I've been asked to implement what has before, been a bunch of CSV files, into a MySQL database. I'm at a point in the design where all the schemas, tables and fields have been mocked-up; however I'm ...
0
votes
0answers
15 views

MySQL - Pivot-style (row -> column) results in subquery

SELECT j.departure, stopDepartures.* FROM journey j JOIN journey_day ON journey_day.journey = j.id JOIN service ON service.id = j.service JOIN pattern ON j.pattern = pattern.id JOIN ( SELECT ...
2
votes
2answers
50 views

Unexpected result from query based on old column value

I need to update a column and based on the old value, update a second column. After googling I came up with THIS (*nr 4) solution: copy the table to have the old value at hand. The table looks like ...
-2
votes
0answers
15 views

increasing Mysql DB Size and Server Size [on hold]

I have installed xampp on my windows machine, i'm using MySQL, How to increase the size of mysql server and databases in it? Kindly help me..! Thanks in advance...!!!?
1
vote
1answer
28 views

MySQL keeps getting “connect” commands 100X per minute!

My server was having performance issues, things loading slow, pages not loading, etc so I ran the "top" command after logging in via SSH. I noticed the CPU kept jolting up to 40%, on and off, when ...
1
vote
2answers
66 views

Monthly report by time

I work in a parking company. We need a report of monthly vehicle exits by time. select hour(datetimeout) as 'dateout',count(*) from to_leaveveh where datetimeout between '2014-09-01' and ...
0
votes
0answers
29 views

How to load data from MySql to MS SQL Server database?

I have the similar schema in both MySQL and MSSQL Server database. How can I migrate data from MySql to an empty (no data) MSSqlServer database? MSSqlServer DB is empty with just the schema. I could ...
0
votes
1answer
24 views

Can you store PHP code in mysql database?

I'm creating a codex that will store example of functions and examples on how to use functions. Can I store this information in a database? Also, is there a proper way of displaying code on a page?
0
votes
2answers
15 views

Update a date_modified MySQL Record Field ONLY when other fields have changed using CASE statement not working?

I have asked my question on Stackoverflow but have not really gotten any answers so I am trying over here now. I have the MySQL query that is ran in a PHP script below. What it does is Inserts a new ...
0
votes
2answers
18 views

MySQL Count Rows with Two Cells the same

I have a db where the cells are height and width. (It's for banner ads) Some banners are the same width, but different height, or visa versa. for example: row1 hieght = 600 width = 120 row2 hieght = ...
1
vote
1answer
25 views

How to find non utf8 data in mysql

Ok so I have a mysql database containing data that is input from various customers. The customers are told that their data should only be encoded as utf8 however I have become aware that this is ...
0
votes
0answers
14 views

Automatic slave reconfiguration after updating master

I have development mysql master and slave servers and a prod server. I need to set up regular (once a week) syncronization of dev and prod databases. It would be easy for me to use prod# mysqldump > ...
0
votes
1answer
16 views

Is it possible to run a trigger on Table Creation in MySQL

Simple Question. Is it possible to create a Trigger that runs everytime a Table is created. The goal is to create a metadata table for each table, but I can worry about dynamically passing the table ...
0
votes
0answers
17 views

Does MySQL have a visual tool for suggesting indexes like SQL Server's “Include Actual Execution Plan”?

SQL Server has a remarkably useful feature called "Include Actual Execution Plan" which not only gives you a visual diagram of your query, but also automatically suggests indexes that can improve ...
0
votes
0answers
31 views

MySQL - Database has huge overhead but tables don't

I have some problems with two MySQL databases. The databases have huge overheads but none of the tables do. When I recreated the tables the overhead just reappeared aswell. I hope you can help me. ...
0
votes
1answer
30 views

SELECT count vs DELETE JOIN. Why/how are they different?

Can someone explain in what way these queries could be different and the results are not the same? > begin; Query OK, 0 rows affected (0.01 sec) >select count(*) from tableA a JOIN tableB ...
0
votes
1answer
30 views

What happens when you have two events scheduled to run after identical n seconds?

I am running a survey and i am getting lots of data and i need to process that data quickly from within mysql.I am using a mysql events to help me process the hundreds of rows that i have. I have ...
0
votes
1answer
7 views

Validate hierarchy of two tables

I have two tables in my mysql database: Questions question_id Answers answer_id parent_question_id child_question_id Basically, I'd like to pass in a question_id, and have all child ...
0
votes
1answer
19 views

Best practices for relating NoSQL data to RDMBS

I am looking to use both a NoSQL solution (Redis, Mongo, etc) with a mySQL/Laravel application. My reasons for this is that I need a schemaless key value storage to go with my relational data. I could ...
1
vote
2answers
97 views

What is faster, one big query or many small queries?

I have been working for different companies, and I have noticed that some of them prefer to have views that will join a table with all its "relatives". But then on the application some times, we only ...
-1
votes
0answers
26 views

How does MYSQL Bin Log work?

I notice once I enable mysql bin log and do a restart on mysql service, there is a log file generated namely "mysql-bin.000001". So I did a quick test to modify database entries and eventually the ...
0
votes
1answer
19 views

Why does mysql allow me to enter password for non existing mysql user

My mysql server has 2 users - root robb But when I try to login with another user it let's me enter password - hussain@magic-laptop:~$ mysql -u jon -p Enter password: Shouldn't it give an error ...
0
votes
0answers
22 views

SQL query to fetch results for multiple many to many relationship tables

We are developing a database for storing licensedetails of source code, archives, shareobjects, binary. We parse a detailed build and extract list of source files that make objects, list of objects ...
0
votes
0answers
12 views

table structure in MySql for a revision mobile application [closed]

i am doing a mobile application project that will allow students to access question form the database and answer them and given answers at the end. the application will cover maths, chemistry, biology ...
1
vote
1answer
33 views

Is it possible that records are changed while a read query is still executing?

Suppose a read (select) query R is reading some 100 records from a table, 50 records are read so far, could in the meanwhile a write query W change some of the unread records? We didn't take any ...