All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

learn more… | top users | synonyms

1
vote
1answer
1k views

Replication of a remote MySQL database to local MySQL database

I'm the developer of my employers corporate private website, a HTML5/PHP/CSS powered site for company reports etc. The site, hosted on a shared hosting package, connects to a remote read-only MySQL DB ...
0
votes
1answer
15 views

MySQL syntax error … what is wrong? [on hold]

I have a table with a decimal 5,2 field of limit. What is wrong with this syntax? update tbl_events set limit = (limit - (limit * 0.02)) where limit > 0
0
votes
0answers
4 views

How to enrich event based data per row based on future events

I'm trying to figure out the best and most performant way to solve the following issue. This data is currently available both in MySQL and RedShift, so a solution for either is fine though RedShift is ...
0
votes
1answer
104 views

MySQL database dump bombs out Error 1064 when using LOCK TABLES

This specific machine is running MySQL version 5.0.27. I have tried to get a full dump of this database several times and each time it bombs out. Tried getting just a structure dump of it and this is ...
0
votes
1answer
105 views

Some tables not found after moving MySQL database from Linux to Windows

I had a MySQL database which I was working with from Linux. Some of the schema/table names were in mixed case. I then needed to work with the same database on Windows, but because of the enormous ...
0
votes
1answer
32 views

MYSQL refuses to set password for new user

I'm trying to create a MySQL user/password. And every time I create the user - mysql does not honor my password. It's just blank. mysql> select Host, User, password_expired, Password from ...
1
vote
3answers
560 views

MySQL 5.7 - Where is the mysql_secret file on Windows 7?

I've just installed a copy of MySQL 5.7 for testing, and I love the fact that it now only creates a single root account, and puts the password into a file called .mysql_secret. There's just one ...
1
vote
0answers
12 views

Conceptual data model for warehousing objects [duplicate]

I'm student and new to databases. I must conceptualize a database model for warehousing video games using a relational database management system (MySQL). Every objects in the warehouse have common ...
0
votes
1answer
206 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 ...
3
votes
1answer
215 views

Relaying changes to a slave from another master with Tungsten on MySQL

I am trying to setup a multi-master type of replication with each master having an additional slave using Tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and hosts A and C are the masters, ...
3
votes
5answers
13k views

How to determine the optimal sort_buffer_size?

I read from a sample configuration file which says the following: # Sort buffer is used to perform sorts for some ORDER BY and GROUP BY # queries. If sorted data does not fit into the sort buffer, a ...
1
vote
0answers
6 views

Why does score for mysql boolean match give different score?

I am attempting to use MySQL's fulltext search using Boolean match on multiple columns, with multiple search phrases. I cannot understand the score returned though. The score returned is typically an ...
-4
votes
0answers
36 views

Query for columns

I need help writing a query. I have a table named "schedule", with columns "start time" and "end time", both with the time data type. Student have today discipline "Networks" from 11:00 (in start ...
1
vote
1answer
23 views

Changing tx_isolation and binlog format on master server - do i also need to adjust slave?

We are running a Drupal Commerce site with MariaDB 10.0 and master/slave replication. Because of the way our application works, we end up running in to a ton of deadlocks under heavy load. Apparently ...
0
votes
0answers
15 views

How to give a prefix to all columns of a JOINed table in MySQL?

I have a data schema like this: car id type -> ENUM('Tesla', 'AstonMartin', 'Bmw') common_attribute car_tesla car_id specific_attribute_a specific_attribute_b ...
2
votes
1answer
20 views

How to JOIN a table with a name that equals to a determined value in MySQL?

The model of the (PHP & MySQL based) Zend Framework 2 application I’m currently working on contains a inheritance similar to the one described here. To map this to the database I’m using the ...
0
votes
1answer
65 views

Update just one unused row

I have a table as follows: token | status | userid | serviceid -------+----------+--------+---------- token1 | ACTIVE | 1 | 2 token2 | INACTIVE | NULL | NULL token2 | ...
-2
votes
0answers
13 views

Please Help for ERROR procedure [on hold]

I have error on create procedure "GetFamilyTree" with copy paste those script on my phpmyadmin tool on localhost this is my error, where is error?? structure table 'category' | idcategory | ...
1
vote
1answer
35 views

Justified multi-value field in MySQL?

I have a table of data that contains 10 point values based on a score for an event (0 - 9 points). If a time is within the range, the point is awarded. There are 20 possible events. Is this a valid ...
-1
votes
0answers
32 views

Inner Join two select statements

I try to apply inner join on two select statments. 1st Select fetches 8K records 2nd Select fetches 8.2k records When apply inner join it fetches 300K something records. I don't know whats wrong ...
1
vote
1answer
117 views

pt-query-digest results are empty

I have a slow log generated by MySQL 5.1.71-log, that I've copied onto another machine. It appears I'm not getting any results from pt-query-digest. $> pt-query-digest slow.log # 2.1s user time, ...
2
votes
1answer
110 views

optimize mysql with mysqltuner Recommendations

Every day at 18:00 mysqlserver became very slow How do I apply the suggestions by mysqltuner for optimize mysqlserver CentOS release 6.6 (Final) MySQL version 5.6.28 64-bit architecture 32GB RAM ...
0
votes
1answer
12 views

Specify what columns to display in a SHOW COLUMNS statement

Does mysql offer any possibility to specify what columns to display in a SHOW COLUMNS FROM my_table statement ? from this : Field Type Null Key Default Extra ...
0
votes
1answer
174 views

MySQL Local Variable Scope and Triggers

I have a couple triggers that automatically update invoice data and set some statuses in the database. However, it appears that if 2 Triggers have variables that are named the same, they get ...
0
votes
1answer
1k views

Why does max_connections in my.ini not match concurrent connections in Mysql instance config wizard?

MySQL 5.1.x | Windows Server 2003 Can someone please clarify why max_connections in my.ini is much larger than the manual value I specify in the Concurrent Connections Dialogue? For example, if I ...
0
votes
1answer
992 views

How to export an Access database and import to MySQL?

I am working on a Java project that sources data from an MS Access database, but I want to use MySQL because I have found it to be very easy to manage. How can I export an Access database that has ...
0
votes
2answers
28 views

Formatting out a column value - mm:ss.hh

I have a time in seconds and I want to convert it to the following formats possibilities: 121.17 -> 2:01.17 | 34.28 -> 34.28 | 133.56 -> 2:13.56 I am using the following: IF(Time > 60, ...
0
votes
2answers
306 views

Dealing with data stored as arrays in a MySQL DB

So I know storing arrays in a DB field is wrong and would never do it myself, however a 3rd party plugin my company is using stores data in an array and I was wondering if you could help me try to ...
1
vote
1answer
28 views

import TSV file into MySQL table with SET datatype column

Is it possible to use LOAD DATA INFILE to load data into a MySQL/MariaDB table, where one column uses the SET datatype? My columns are separated by tab, my set members by comma. If so, how do I ...
0
votes
0answers
11 views

hosting mysql server on the cloud or local network pc

I have a question on whether to host a mysql server on the cloud or a local network pc. In the current work environment all users log on to the cloud and work from the cloud. All the work ...
1
vote
0answers
9 views

MariaDB strange user privileges issue

Server version: 5.5.47-MariaDB-log MariaDB Server / CentOS Linux 7 x86_64 I have two users: user@% and user@localhost with the same password but apparently different privileges (some privileges the ...
0
votes
1answer
23 views

database design help with multiple table relationships

Been scratching my head on how to set this up and looking for your help. Trying to create an API and not 100% how my tables should relate to one another. So lets say I have users, food, and food ...
1
vote
1answer
307 views

Maxscale read write split and route filter

I have trouble to forward all SELECT requests to the slave in a MySQL master-slave architecture. I'm using maxscale's read-write router, which does its job except for all statements using ...
0
votes
0answers
15 views

Is Mongodb a smart decision for a social network? [on hold]

So this question is more than a bit broad , I would appreciate input from those with experience working on social networking. I have been questioned many times why I have chosen MongoDB for a social ...
1
vote
1answer
146 views

MySql Innodb corruption recovery

I have a MySql database, just containing Innodb tables, that seems to have corrupted itself. It replicates to another server and it has corrupted that one too! The symptom is that I can restart the ...
0
votes
1answer
130 views

How to Upgrade Master Slave MySQL on AWS RDS?

I already have Master Slave configuration on AWS RDS. We want to upgrade 5.5 to 5.6.23. ..What should be correct sequence to Upgrade ? 1. Upgrade Master ( Using Modify Instance ) --> Upgrade Slave 2. ...
0
votes
0answers
16 views

MySQL server refuses remote connection when under high load

When my MySQL server is under high load from the local machine it doesn't accept any remote connections. When load is normal it connects without any issues, but under high load neither a MySQL nor ...
0
votes
1answer
19 views

Why does phpMyAdmin execute all queries with an apostrophe?

For example, if I use the GUI to perform an INSERT, the console will log the following execution: Why does each item have apostrophes (aside from NULL)? I know that I can do a literal INSERT via ...
1
vote
1answer
45 views

How can I better model the relationships in this project?

I'm developing an internal tool (as an intern). We deal with a lot of hardware, which is all custom and managers have a hard time knowing who is developing on what machine. The three main things to ...
-3
votes
0answers
20 views

Setting up a MySQL DB: Local or on hosted server? [on hold]

I'm not new to PHP but I have never used my own computer to set up a web-programming environment. I'm having especially trouble understanding setting up MySQL locally vs on a hosted server. My ...
0
votes
1answer
19 views

How to set mysqldump using /*!40101 SET character_set_client = utf8mf4 */;?

When I use mysqldump to export mysql database, it always produce a dump.sql containing ...some other things... /*!40101 SET character_set_client = utf8*/; ...some other things... This is the ...
-2
votes
2answers
24 views

pick data from multiple tables

I am new to MySQL. My question is how to make a filter like amazon product. I made a matrimony site with filter. I wrote a query to access data from multiple tables. I give foreign key to another ...
0
votes
1answer
10 views

Could not connect to the specific instance. MySQL error number 1045. Access denied for user 'root'@'my public ip' (using password:YES)

I was using MySQL query Browser in my system and type the IP address of the remote Server and log in. I tried to create a store procedure and scheduled an event to call the procedure every two ...
3
votes
2answers
263 views

How to optimize indexes on MySQL query with various sorts

I have an INNODB table levels: +--------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
0
votes
0answers
17 views

how to fixed this mysql 5.5 crash?

[root@DB-Server-master bin]# mysqld_safe --user=mysql 160429 12:10:55 mysqld_safe Logging to '/data/mysql/data/log/mysql-error.log'. 160429 12:10:55 mysqld_safe Starting mysqld daemon with databases ...
0
votes
1answer
16 views

Cant initialize MySQL. “mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended”

I am doing a fresh install of MySQL on Fedora 22. After I run mysql_install_db I try to start the daemon using mysqld_safe but it does not work. The system says: mysqld_safe Logging to ...
1
vote
5answers
315 views

Replication in same server within different databases. Mysql 5.6

What I have : a windows machine with one instance of MySQL 5.6 Server. two database named test and test2. Test database has a table called activity with columns id and class What I need : ...
1
vote
1answer
812 views

Sync MySQL with SQL Server 2008

My current project requires a form on my website to populate a table in a MySQL database with data a user submits via the form. This will work great but my complete goal involves getting that data ...
0
votes
0answers
19 views

MySql Error : Database page corruption on disk

Recently Ive setup a xampp in my store location. on Windows 7 32 bit, 2GB RAM - Pentium PC. (XAMPP) xampp-win32-5.5.19-0-VC11 PHP application is Point of Sale. With latest mysql server and PHP 5.5. ...
0
votes
1answer
129 views

mysqlslow - excluding queries from mysqldump

I would like to ignore the queries in my mysql-slow log that originate from mysqldump using SQL_NO_CACHE as the trigger word. My experiences using regex are limited at best and I'm unable to find any ...