MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
5 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 ...
0
votes
0answers
7 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
15 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
1answer
8 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
15 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 = ...
0
votes
0answers
14 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
10 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
0answers
14 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
15 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
25 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
28 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
29 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
6 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
0answers
10 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
80 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
24 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
18 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
17 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
11 views

table structure in MySql for a revision mobile application [on hold]

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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
38 views

Optimize Mysql SELECT from 60 milion rows

Task and Problem There are 100 realms and 10k items. An item has many histories. There are 600k histories in each realm. And I want to find all of an item's histories of the last day by using: ...
0
votes
1answer
17 views

mysql - Very slow response even with a high number of available connection

I'm running this server for data mining purposes. It runs several compute intensive data mining applications parallely and does simultaneous access to the MySQL server. Here are the configuarations. ...
1
vote
2answers
48 views

Does a whole-server backup guarantee a reliable backup of running databases?

Many hosts offer a full-server backup once per day. However, I've been told that a backup of this kind doesn't guarantee a reliable backup of running databases, because even if the database uses ...
0
votes
2answers
153 views

Relational Model vs. Database Products [on hold]

The formal Relational Model (logical level) for databases is not exactly the same thing as you get with MySQL, Oracle or other major products / implementations of ‘relational’ database management ...
0
votes
0answers
12 views

MySQL hook and alter incoming INSERT queries?

We have an application running on a server which parses an xml data feed into SQL queries and executes them continually 24/7. There is a serious issue in the design of the queries and we need to ...
1
vote
2answers
30 views

Unable to SQL => Getting content of last 7 days

I thought I was good with SQL till I was told to get the content of all 30 days. I do have a column called "connect_time" which has date and time in the following format: 2014-08-28 11:11:42 All my ...
0
votes
0answers
10 views

Testing data integrity porting from old database to new

I've created a Web/ASP.NET/MySQL database front end & back end that gets created from the XML logs from a previous Java based XML client-server that is not serving the company very well (the XML ...
0
votes
1answer
26 views

Appropriate use of mysql Optimize Table

I want to come up with some best practice for maintaining our mysql database. versions 5.5/6 and using InnoDB. i came across this artice - ...
0
votes
0answers
12 views

store code/script value as text in database

I have the following situation: I have to work with software, developed in Java, that allows the user to input some custom scripts in order to do some calculations. so i have to store/save the ...
0
votes
1answer
34 views

What drawbacks are there in scheduling an event to run every too often,say after every 60 seconds?

I have this event i want to run every 60 seconds but i wonder if this will take up many resources in my database. CREATE EVENT myevent ON SCHEDULE EVERY 60 SECOND DO UPDATE ...
2
votes
0answers
17 views

Translate SQL Server update statement to MySQL

I have a development environment with MySQL and a production environment with SQL Server. This update statement works with SQL Server: UPDATE THIS SET <list_of_column_assignments> FROM ...
0
votes
3answers
21 views

What's the proper design for the table that will hold the processor load stats?

Let's say that I need to implement a widget on the site that allows the user to view the processor load stats via a chart. The user will be allowed to choose how detailed the statistics are: with ...
1
vote
2answers
14 views

mysql information schema database last used datetime

I have a lot of tables in my database, almost 1,000. Most of them I am not using now. Is there any way to know from the information schema tables when I have last used my tables?
1
vote
1answer
12 views

Mysql Server version: 5.0.77-log Source distribution

I have a master(M)-slave(S) replication on MySQL. During a failover test, the master was brought down and the slave was made the master by doing STOP SLAVE; RESET MASTER;. Since there are only 2 ...
0
votes
1answer
51 views

Why isn't this index helping my InnoDB MySQL query?

I'm having trouble understanding why an index I have on one of my tables is doing nothing to help the performance of a JOIN, even when forcing the index. Here is the query: EXPLAIN SELECT * FROM ...
0
votes
0answers
27 views

Selecting most recent date when dates are stored in another table

Working in a MySQL database, I have tables set up like this: Table song_instances has song_id (int), meeting_instance_id (int) The meeting_instances table has columns meeting_instance_id (int), ...
0
votes
1answer
20 views

database search index for dating site [on hold]

I have a MySQL innodb table used for searching but I am not sure what columns do I put a index on, I was going to add a index to every column but recently learned that would do a full table scan and I ...
1
vote
1answer
22 views

how to create database with charset utf-8

I'm new in Mysql, how to create a db with charset utf-8 like i did in navicat? create mydatabase; seems using some kind of default charset.
-3
votes
0answers
12 views

mysql join side by side problem [on hold]

my problem is that, i have 2 tables and i want one query and fast but, i did not this query. 1st. table detail name matches column names is matches_id, match_code, match_date, 2nd.table detail name ...
0
votes
0answers
24 views

Cant Normalize my dimensions and fact table, need help

I have a task at school that I can't get my head around. The task is to create some dimetables and create a facttable from those. The data I have chosen is from Export and Import cost for each year ...
0
votes
1answer
22 views

Is it normal that I have to FLUSH QUERY CACHE once every 6 hours to maintain fast queries?

I am running MySQL 5.5.37. I have a cronjob set to run every 6 hours to flush the query cache. I realized that if I don't do that, then the cache becomes fragmented and average query response time ...
1
vote
0answers
14 views

Copying to tmp table slow for query … but only sometimes

I have a query, and I admit it may not be the prettiest query in the world. Sometimes this query runs fairly fast (e.g. 200ms) and other times it runs super slow (e.g. 30s). I don't know why, and ...
0
votes
0answers
10 views

General error: 1615 Prepared statement needs to be re-prepared

I have been running into this issue every time I try and sync a medium size JSON object to my database so we can perform some reporting on it. From looking into what can cause it I have come across ...
0
votes
1answer
19 views

MySQL InnoDB log files on different location

I am using MySQL version: 5.5.38 There are following parameters that can control InnoDB log files: innodb_log_files_in_group - amount of log files in the group, by default 2. Will create 2 files ...
0
votes
1answer
22 views

Changed a user name in MySQL, but user is still able to login using previous user name

I created a user with user name user_dev. Then created a database sampledb and granted some privileges to this user on this database. Then I decided to edit username and changed it to user_local, and ...
1
vote
1answer
16 views

MATCH AGAINST one character words returns empty rows with ft_min_word_len = 1

I've set ft_min_word_len = 1 to my.cnf file, also SHOW VARIABLES LIKE 'ft_min_word%' displays ft_min_word_len as 1. Then I've reloaded all database tables and it still doesn't search for one character ...
1
vote
0answers
16 views

MySql Audit Changes from Db Admin, Security

I know that you can use triggers (before insert, update, delete) to track the changes in history tables. But this only works if the changes are made by the applications. But in some circumstance, ...
0
votes
0answers
10 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
0answers
25 views

mysql connection requires socket flag

I'm running mysql 5.6.19 on centos 6.4. I have my /etc/my.cnf file set as the following: [client] port = 3306 socket = /data/mysql_data/mysql.sock [mysqld] bind-address = 0.0.0.0 report-host = ...
0
votes
1answer
20 views

Slow server with many access [on hold]

I have a problem of slowness in a server with few tables and many changes and many data I changed the MySQL by MariaDB My server is in the digital ocean with 8 processors and 16GB of RAM, but are the ...