MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
7 views

MHA configuration problem with MariaDB10

I am using MHA (MySQL Master High Availability) over a MySQL/MariaDB master-slaves pool. Here is my setup : master1(10.0.0.1:3306) (current master) MySQL 5.1 (log-bin:enabled) ...
0
votes
0answers
8 views

Why does Amazon RDS memory utilization drop and disk space utilization rises?

I encountered a problem with my Amazon RDS(db.m2.2xlarge) where DB connections spiked up and my website started responding slowly. On looking up the metrics I was not sure why my freeable memory shot ...
0
votes
1answer
7 views

How do I allow remote mysql access to all users?

I have setup a mysql server on unbuntu. The server hosts websites for my various clients. Hence, I want all of them(and any new clients) to have remote access to the mysql server. How do I configure ...
-1
votes
1answer
22 views

“Bad SubDomain SQL query”

My website shows "Bad Sub Domain SOL query" when i open the site.It's an E-commerce site, platform is PrestaShop(Version: 1.5.5.0) and it worked well in the last 2 years. Now it shows "Bad Sub Domain ...
0
votes
0answers
8 views

MySQL/PHP Returning Blank Error Message

I am using the following code to delete a record. It works fine, but MySQL always returns a blank error message. PHP returns "Error: " instead of "1 Record Dropped". $eventid = ...
0
votes
0answers
10 views

What are the advantages and disadvantages of Sequel Pro over writing on my terminal?

I am starting to use MySQL (I am actually learning). What are the advantages and disadvantages of Sequel Pro over writing on my terminal? Where can I find a good quick tutorial to use those advantages ...
0
votes
0answers
15 views

Grouping together values in different columns in MySQL

I have hierarchical data and I'm using the adjacency model. For example my table looks like CREATE TABLE books( book_id INT AUTO_INCREMENT PRIMARY KEY, book_category VARCHAR(100), parent INT ); ...
0
votes
2answers
26 views

MySQL Code Works in PHPMyAdmin but not in PHP Page

When I run this query in PHPMyAdmin it works fine, but when I run it from the PHP page using the $sql command, I get the error: "You have an error in your SQL syntax.....near ')' at line 2" $sql = ...
2
votes
1answer
26 views

Auto-increment ids with multiple inserts in mysql/mariadb

Suppose I have a table with an auto_increment column, and then insert multiple values in a single statement: insert into foo (bar) values ('a'), ('b'), ('c'); From the documentation, ...
1
vote
1answer
21 views

mysqldump drop create use case sensitivity

Dumped sql from MySQL is showing inconsistencies in the name of the database. Using the following bog standard method to dump a database: mysqldump --add-drop-database -u someuser --databases ...
0
votes
3answers
39 views

Master-master Replication with 3 Nodes

I need to configure mysql master/master replication with 3 nodes. Currently I have master/slave setup and I need to move it to master/master with 3 nodes. I have gone through some posts about ...
0
votes
1answer
20 views

Is it possible to uninsall MySQL-5.6 and install MySQL-5.1 on RHEL 5

I have installed MySQL-5.6.x community edition on RHEL5. It was running fine. Since, it is my testing server. To find the differences in execution timing, I have to install the MySQL-5.1 community ...
0
votes
1answer
23 views

MySQL crashing randomly

We have a sever running a website Joomla 2.5. We are facing frequent mysql crashes that occur when website has medium visitor load like a few thousands. It appears that mysql consumes more memory and ...
1
vote
1answer
13 views

add column without metadata lock in mysql 5.6

I am using MySQL Server version: 5.6.15 Homebrew. I need to add new null column. alter table requires no metadata lock. In order to avoid this MySQL 5.6 introduced algorithm=inplace. Here is the ...
2
votes
2answers
39 views

Copy from one MySQL table to another MySQL table of same database

I have around 40 million rows in a MySQL table and I want to copy this table to another table in same database. What is the most efficient way of doing this? How much time will it take (approx.)?
0
votes
1answer
31 views

Pulling from Two Tables with Different Number of Records

I have three tables, one for members with 8 records, one for tasks with 1 record, and one for events with 3 records. The tasks table associates the events with members using one-to-many primary to ...
0
votes
1answer
20 views

Adding a constant IF not in an other table

So I have this query. SELECT * FROM `Comment` WHERE `Target` = '".$_GET['pp']."' AND `Id` NOT IN (SELECT `Target` FROM `Delete` WHERE `Type` = 'comment') ORDER ...
0
votes
2answers
30 views

query execution time in mysql

I have run the query in mysql which consists of approximately 33million records when i have executed the query select population1 < 200000 from city; it shows like this after execution ...
0
votes
1answer
12 views

Mysql Select using Alias

I Need to filter the query that have some conditional column as below: SELECT `c`.`fullname` AS `fullname`, IFNULL(`c`.`new_ic`,`c`.`old_ic`) AS `Ic`, `bla`.`loan_no` AS `Loan_No`, ...
1
vote
1answer
26 views

Merge a table into an existing one

I know how to JOIN two tables as create a new table out of the results, using CREATE TABLE result_table AS ( SELECT * FROM tableA JOIN tableB ). I forgot to include some columns from the JOIN in the ...
0
votes
0answers
10 views

Get travel_point.address_from and travel_point.address_to when driver_has_book.status is 0, 1 or 2

I'm building a view for get travel_point.address_from and travel_point.address_to when driver_has_book.status is 0, 1 or 2 (basically I'll need another data from related tables). I leave the SQL ...
0
votes
1answer
15 views

change character set in mysql permanently

I want to change following parameters to utf8mb4 so that mysql can store emoji characters and special language characters. but when i try running following statements one by one SET ...
0
votes
1answer
35 views

Find youtube url

Good afternoon, I need a help, through a select have to locate within a column all the urls from youtube 'https://www.youtube.com/watch?v=cod'* N codes, as necessary to generate a txt with these ...
1
vote
1answer
16 views

Bypassed, Empty Relay Log

We have a simple 1:1 Master-Slave replication configuration. The Master crashed, but we recovered and replication seems fine (confirmed by pt-heartbeat and SHOW SLAVE STATUS) but we've picked up one ...
2
votes
1answer
43 views

mysqldump --single-transaction, yet update queries are waiting for the backup

If I use mysqldump --single-transaction, according to the docs it should do flush tables with read lock to get a consistent state and then start a transaction and no writers should be waiting. ...
1
vote
0answers
13 views

MySQL getting killed by AppArmor

I have copied this link from StackOverflow as it is marked as out of topic there and is waiting to be transfered here. So, here it goes: Occasionally, without any identifiable pattern, MySQL ...
0
votes
0answers
21 views

Creating a registration page with PHP and PDO [migrated]

I need to create a registration page using PHP and PDO, and encrypt the password before storing it on the database table using md5 (adding 2 salts to the password). How can I write the script for ...
1
vote
0answers
29 views

call id of a table to a new table and insert values to this new table [migrated]

I have recently started to write server scripts. Although the question may seem to be very basic but i am not able to get a solution. I have two tables one is PRODUCTS and the other is DEALS. ...
0
votes
1answer
33 views

Building a query programatically

I have three variables $color, $size and $category. Each oh them can be a specific value or may refer to all entries.I want to fetch all products that are $color = "red", $size = "Medium" and any ...
1
vote
1answer
37 views

A table that consists of multiple FK or creating separate tables for each FK

I have tables called 'books', 'category', 'subcategory', and 'booksCategory'. Each book can have its own category and subcategories. For example, a Sci-Fi book can belong in the 'category' table under ...
0
votes
1answer
29 views

Can I use mysql/mariadb databases on different OS?

If I will use mysql/mariadb on Windows and soon I'll decide to switch to Linux or vice versa, can I use databases created in one operating system in another one without any data-loss? Thanks in ...
0
votes
1answer
44 views

Inserting data into multiple tables

For my system, students are required to create a user account by completing a registration form (personal, contact and course details; also username and password). I need to collect registration data ...
0
votes
2answers
32 views

Sql statement to compare two table

I have two table with the same structure, i want an sql statement to compare them and see any modified line, deleted or added Table Product1 : ________________ |Product | Price| |Product1 | 10 | ...
0
votes
1answer
14 views

How to disable HTML output in mysql console?

I've used several mysql instances on many servers, but this one had a suprise for me tonight when I tried to use its console for the first time : me@MYSERVER:~$ mysql -H my_base (....) (...) Server ...
1
vote
2answers
26 views

Perform group by with random group expression (randomly partitioning rows) MYSQL

Let's say I have a table (with millions of rows) cat1|cat2|value A | B| 10 ... and I want to group the data by cat1 and also split the grouping into 10 (at least roughly) equal partitions of ...
1
vote
2answers
47 views

What subquery do I need to calculate this report?

I have two tables: tickets and comments. I need to run a report that shows me which ticket is "neglected" meaning that there has not been a comment in X amount of time. If I was to do this in PHP, I ...
0
votes
2answers
32 views

Building a dedicated physical MySQL server [on hold]

I have a database that I use to mine a "primary" 20-column table with 18 million rows and growing by about 2 million a week, and that may accelerate. I am working to pre-process data by running PHP ...
0
votes
1answer
23 views

Perl - MySQL/MariaDB - slow with no identifiable bottleneck

I am running a Perl script (using DBI) which reads from raw files from a hard disk, and updates MySQL database (which is on a separate SSD). My performance is rather slow (1000 files processed in ...
0
votes
0answers
15 views

LDAP authentication with Percona Server

Reading over this post it seemed to indicate this plugin allowed user authentication via LDAP Percona Server is bundled with the PAM plugin which opens a plethora of ways to authenticate to ...
0
votes
2answers
32 views

Using a join to return multiple values of the same column?

I have two tables user Rank In the Rank table, I saved rank_id and supervisor_id. In the Rank table, I stored the rank name. The rank_id and supervisor_id are foreign keys from the Rank table. ...
0
votes
1answer
44 views

SQL SELECT - adding field to SELECT with JOIN is changing the results

I have a SQL sentence with JOIN, running on mysql 5.5.16: SELECT DISTINCT (ot.orders_id), ot.value FROM orders_status_history osh INNER JOIN orders_total ot ON ( osh.orders_id = ot.orders_id ) WHERE ...
1
vote
2answers
33 views

How to insert values into a table from two different tables?

I have three tables students table ------------------------------------ id(PK, A_I) | student_name | nationality teachers table ------------------------------------ id(PK, A_I) | teacher_name ...
1
vote
1answer
34 views

pass data from deleted table to another

This is the situation: I have a table, with name TABLE_1 I would like delete TABLE_1 and then create another table with the same name and some of its columns. TABLE_1 has records, but I need to pass ...
0
votes
1answer
31 views

Auto refreshing a query

I have a SQL statement update test_1 set `t_mark` = (`mark_1` + `mark_2` + `mark_3`) which works perfectly but I want the same statement to repeat automatically when a new row is added.
0
votes
1answer
29 views

Tools for migration from MySQL to PostgreSQL [on hold]

I have been trying with RazoSQL, mysql2pgsql and dbconvert. But none of this worked fine for me.
2
votes
2answers
52 views

MySQL 5.6: Slave_IO thread stops working

Standard replication breaks for no apparent reason. mysql> SELECT @@version, @@version_comment; +---------------+----------------------------------------------------------------------------+ | ...
-1
votes
1answer
32 views

Btree index and Bit Map Index [duplicate]

Please clarify the difference between BitMap Index and Btree index. I am using mysql version 5.5.37-0ubuntu0.12.04.1. I can able to create Btree index but unable to create the same, Please find the ...
0
votes
1answer
35 views

Inheritance discriminator column better int or varchar or enum?

What is the best practice for storing a discriminator column ? Does it make any difference ? Any pros/cons of using one over the other ? I am using MySql with Entity Framework but the question goes ...
1
vote
1answer
16 views

MySQL Cluster MaxNoOfConcurrentOperations and RAM

Why increasing of MaxNoOfConcurrentOperations lead to higher consumption of RAM? I need high value for fast filling tables with some random data, but i noticed that my datanodes are swapping at ...
0
votes
1answer
26 views

ON creating BITMAP INDEX on a table in mysql throws error

say, i have database named "demo_dev" database and added a table named "countries". i wanted to create bitmap index on a column say region as it has less unique values using following query. CREATE ...