MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
1answer
31 views

MYSQL count the number of members in a group

Recently started working with MySQL and PHP so my setup is still a bit clunky most likely but here is how my 2 tables look right now: Table 1 named clanlist Table 2 named clanusers What I need ...
2
votes
1answer
36 views

Why MySQL Workbench automatically sets NOT NULL for ID column that is PRIMARY KEY?

My question is why MySQL Workbench automatically sets NOT NULL for ID column that is PRIMARY KEY? I thought that PRIMARY KEY's can't be NOT NULL by definition? Is it really necessary to set it to NOT ...
1
vote
1answer
35 views

Automatic deduplication (normalization) of strings in MySQL

The question is whether MySQL can use separate physical storage for strings transparently, but with the same operations that are applicable to varchar, including %. I have a large number of ...
0
votes
1answer
52 views

Is a mySQL or mongoDB relational database scalable for holding 80 GBs of additional logs per day? [closed]

I am currently deciding on a long term architecture solution for storing DNS logs. The amount of data we are talking about numbers some 80 GBs of logs per day at the peak. Currently I am looking at ...
4
votes
1answer
58 views

Does MySQL exectution plan depend on available indexes?

Does MySQL choose an execution plan for a given query taking into account what indexes are available, or does it first choose an execution plan and then uses indexes if they are available? ...
0
votes
2answers
23 views

How to tell MySQL to ignore all indexes for a given query?

I've been benchmarking several queries and learning about indexes by using the explain function, profiling and the SQL_NO_CACHE option. My usual benchmarking session goes something like this: SET ...
1
vote
2answers
142 views

Can I tell MySQL what to cache?

Pretty straightforward question: Let's say I have a specific query that I know is regularly used, can I tell MySQL to always cache it "automatically" ... i.e. once the cached query results are ...
1
vote
1answer
15 views

How to get different “modules” from modules table?

I have "moduller" table in that table keeping modules of system with function name. Two information in one field. Like this: Slug field mean is like this: "MODULE_NAME/function_name" I want to get ...
0
votes
1answer
19 views

Restore of db's on local locks me out of accessing other sites

Running my local dev websites on my Mac locally and when I am restoring a database via terminal, which the restore is running I cannot access anything that uses mysql, I get a broken pipe notice. Is ...
0
votes
1answer
16 views

Setting MySQLDump to keep running in the background after session times out

I'm tryng to set up a new Slave DB by copying another Slave DB. Normally I would simply use MySQLDump to dump the Slave and create a .sql file, then import that into the new database. However, as our ...
0
votes
1answer
55 views

Complex query performance in MySQL InnoDB versus MyISAM

I am running on MariaDB 10.0.15 on a 4GB RAM cloud server with Local SSD disk for database. My model: users <n---n> right_holders <n---n> tracks ---n> raw_detections I have this ...
1
vote
2answers
43 views

One to many to many

I have just inherited an app with a MySQL database in need of performance tuning. One particular task that takes way too long involves three tables: monitor(id, ...) result(id, FK(monitor_id), ...
0
votes
1answer
28 views

MySQL does not generating PID file

I upgraded my OS from redhat 2.6.3 to 2.6.5 after that when I restarted my MySQL server but it not started, error message is "150320 11:53:17 [ERROR] Error message file ...
1
vote
2answers
73 views

Large ibdata file in MySQL

I am having MySQL database with all my tables as InnoDB with file_per_table config on. But Still I m seeing huge ibdata file ( ~50GB). All tables are having .ibd file as well. This is a machine I have ...
0
votes
1answer
15 views

What impact do queries have on a server's resources?

This is a really ignorant question, but I'm wondering what impact queries have on a server's resources in general and can't seem to find a straight answer through searching. For example, suppose a ...
0
votes
1answer
25 views

How to split a row based on a delimiter into multiple rows and retain the ID and ordering by using a single SQL statement for MySQL

Scenario: A MySQL table A Delimiter (e.g. comma) is used to separate entities inside a string store in a column of the MySQL table MySQL table contain 2 columns - ID and Countries_Involved ...
2
votes
0answers
29 views

After restarting Mysql replication, Slave commands are executed

up vote 0 down vote favorite I have a Mysql Master Slave Replication which is working fine. Unfortunately I got some serious problems on my slave and the only chance I saw was to restart the whole ...
1
vote
2answers
59 views

ALTER primary key column from INT to BIGINT in production (MySQL 5.6.19a)

Some INNODB tables in our production database are about to hit the INT AUTO_INCREMENT limit of 2147483647 and we need to alter them to BIGINT otherwise writes will start failing. The tables are in a ...
2
votes
1answer
67 views

Mysql Cluster vs Percona/Maridb Cluster [closed]

We want to setup a mysql cluster with master-master sync replication, to provide HA so that one db for write from one app, other for write from other app. It is a webapp with high write and medium ...
0
votes
1answer
17 views

Should I exclude mysql database from multi master replication?

Running mysql in a two master replication setup. There are many databases and they are all replicating correctly including the mysql database itself. Is it safe to replicate mysql or should I exclude ...
0
votes
1answer
27 views

Creating Database Tables for Reviews functionality that incorporates Tags/Categories

I'm wanting to create some simple website functionality through a little database idea I have in order to give myself the ability to create/retrieve customer reviews based upon tags/categories. More ...
0
votes
1answer
28 views

MySQL partitioning table by date and hour

I have a table with a timestamp field. This table will have millions of rows every day so the idea is to create partitions by date and hour. Every day I will delete partitions older than 10 days and ...
1
vote
1answer
21 views

MySQL - stay in cache priority for queries

Is there a way to tell MySQL that some queries has highter priority in cache and mustn't be popped out until it's data become invalid? The problem is that innodb cache size is rather small and data ...
1
vote
1answer
46 views

Dump All Databases in MySQL - Fails on mysql and performance_schema

I have had two attempts at dumping all databases but both have failed, one with the mysql database and then with the performance_schema database. The precised errors are:- 11:01:01 Dumping mysql - ...
1
vote
2answers
32 views

MySQL Duplicate entry for a greek word

I have a column which is unique and when I add Αγάθη and Αγαθή (which are different) it says #1062 - Duplicate entry 'Αγαθή' for key 'word'. My collation is set to utf8_general_ci. Is there any ...
-1
votes
1answer
31 views

Server has antivirus. Do I need to enable external locking on MySQL?

From MySQL docs: If you only read tables with other programs, external locking is not required Assuming the bytes of MySQL files does not match viruses, the antivirus will not change the ...
3
votes
3answers
60 views

How does like query work with indexed table

I am working in Spring-java and mysql. I have to query the table of size 100k records. Table has say 10 columns. And In my sql select query I have to make like queries with %text% search on say 4 ...
0
votes
0answers
43 views

MySQL replication: most important config parameters on slave for performance on master server?

This query is almost the same as this question. But in this case, a configuration to make the master perform faster or just the same. Case We have a Master-Slave setup on a Mysql 5.0.77 - MariaDB ...
0
votes
0answers
13 views

Creating a Views on an non-relational table, can't rotate

I have a table that is set up similar to this. id | key | value1 | value2 | value 3 01 | fname | "john" | null | null 01 | lname | "doe" | null | null 01 | bday | null | YYYY-MM | ...
0
votes
0answers
14 views

How do I force MySQL to write the databse into the data files in the disk? [duplicate]

I'm running MySQL server 5.6 on Windows 2012 R2, and since the installation didn't go as planned, I had to re-install it to change the data directory path. The installer for some reasons never gave ...
0
votes
1answer
22 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
23 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 . ...
1
vote
0answers
35 views

Configuring slave from EC2 master to Amazon RDS slave

I am configuring replication from EC2 master to Amazon RDS instance. After starting the slave, I don't see any errors but I see slave_IO _thread is connecting. Master version:5.6.23 Slave ...
1
vote
3answers
33 views

Can I remove the middle slave in a MySQL “master -> slave -> slave” setup?

Let's say I have the following setup: Master -> Slave1 -> Slave2 I would like to remove the middle slave, Slave1, and have the following: Master -> Slave2 My gut is that I can do the following: ...
0
votes
0answers
31 views

MSDASQL returned message “ Key column information is insufficient or incorrect. Too many rows were affected by update”

Here we had two database one is SQLServer(retrieve and store attendance info) and MySQL(query from SQLServer and store as backend of PHP codes) Could you help to check and define what's the exact ...
1
vote
1answer
36 views

MySQL Update a table based on the last data from another table while grouping with conditions

I need a query to UPDATE a series of fields based on another table Table lp_plates_backup | uid | brand | model | | 1 | | | | a | Old | Error | ...
0
votes
1answer
57 views

MySQL Workbench not showing stored procedures that I have created

I have a simple stored procedure that I have just created. I have applied this script to my database This script shows up in the my list of stored procedure However, when I restart MySQL ...
1
vote
3answers
50 views

Special function slow in where but not in select

I have kind of a special problem using a levenshtein algorithm in MySql. But I don't think that it's special for levenshtein. This query: SELECT *,levenshtein(word,'Facbook') FROM Words WHERE ...
-2
votes
1answer
52 views

any advantage or disadvantage to have mysql 5.6 on a linux server over on a window server [closed]

i am planning to decide to use mysql5.6 on a window server 2012 or a linux server. Can someone gives me some general advises between the two?
0
votes
2answers
37 views

Is this query supposed to be slow?

Select * from (select tmp.userid userid, tmp.username ,tmp.likescore+tmp.commentscore+tmp.sharescore+tmp.tagscore+tmp.userscore+tmp.lsharescore+tmp.friendscore as score from ( SELECT ...
2
votes
2answers
98 views

mysql write lock

I dont add any manual locking or any transaction anything, just manual running queries from php script, and execute below two update queries at the same time update table_x set status = 'PROCESSING' ...
0
votes
0answers
15 views

Can we add different log files for different databases in MySQL for recovering the queries?

I have a master master replication system for a single database. In mysql all the logs for a single database can be recovered through binlogs and relay logs. Now I'm adding another database for the ...
0
votes
1answer
24 views

Who has deleted MySQL user from management console?

How can I find who has removed a SQL login from MySQL instance? Checked event viewer but cannot find anything.
1
vote
1answer
45 views

MySQL running fine while data files (disk) are not present. Data folder nowhere to be found

I'm running MySQL server 5.6 on Windows 2012 R2, and since the installation didn't go as planned, I had to re-install it to change the data directory path. The installer for some reasons never gave ...
1
vote
2answers
26 views

MYSQL: update field with random fixed char

would like to update all record on a field which i only want it to fill it with random either Y or N currently using: update table1 set field1=( RAND() FROM Y FOR N) which is not working, any ...
0
votes
1answer
48 views

MySQL database got corrupted

It seems that whenever I restart my Windows 7 64bit box MySQL gets corrupted. I just wanted to make this bug known as it's a serious issue. Are there any special settings I need to setup (task ...
1
vote
0answers
44 views

Get unique rows based on max of a column in mysql

I came across many solutions like the one in this question. However, they all are restricted to data from one table. I'm very very new to SQL. I'd like to get the same results as in the linked ...
0
votes
0answers
21 views

MySQL: routines removed but still in information_schema

I have a MySQL server with a lot of stored procedures (around 150). When I tried to list the routines with PHPMyAdmin it requires a lot (around 2-3 minutes) in order to load all of them. So I started ...
0
votes
2answers
33 views

case statement when grouping?

I have data that contains multiple games, each game would have several users picking it and they would all be grouped into a single week. At the end of that week I evaluate the results and assign a ...
0
votes
1answer
31 views

Need help achieving HAProxy active/passive configuration for mysql

I'm using HAProxy for mysql database backends. The database had to be master-slave. The goal is to point all mysql clients at the proxy and for all requests to go to mysql server #1 and only go to ...