MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
51 views

MySQL database is going down once or twice a week, how do I diagnose?

I have a linode.com account running Ubuntu 12.04 LTS. On my server I have two instances of wordpress running with light traffic (100 to 400 users per day each) and an instance of Sendy (which is ...
0
votes
0answers
19 views

How to handle lock timeout error in MySQL?

I am getting below listed error many times in my application log. 2015-05-19 10:27:57,842 ERROR [Timer-3] [org.hibernate.util.JDBCExceptionReporter] Lock wait timeout exceeded; try restarting ...
0
votes
0answers
5 views

How to set the log-error level from [NOTE] to [DEBUG] in Mysql system?

I want to trace the SQL execution in mysql system. so I want to set the log level property of mysqld. like from [NOTE] into [DEBUG].
0
votes
0answers
18 views

have_ssl disabled in MySQL (windows)

I want to enable SSL connection in MySQL. I've tried all the possibilities over the internet. But still I'm unable to figure out what exactly went wrong. Here's what I did so far. I followed ...
0
votes
1answer
37 views

MySQL Pivot Table Dynamic Rows

I have a table like the one below: +-------+-----------+-----------+-----+--------+-------------+ | grade | firstname | lastname | age | gender | student_num | ...
0
votes
0answers
21 views

Business Entity Search by Latitude and Longitude

I want my users to be able to get Restaurants of the current location. The Android App of client passes the latitude and longitude of the current location by calling the Google Place API. I call the ...
-1
votes
0answers
45 views

Count the same value from 2 tables [closed]

EDIT: http://sqlfiddle.com/#!9/d8893/11 LASTEST I want it to count between 2 tables how many pokemon i truly have but table 1 has the data of all pokemon and table 2 is inserting and confirming that i ...
1
vote
2answers
41 views

How do you minimize downtime for an ALTER?

I've recently inherited a MySQL database that is growing. It's just over a billion records and the performance of one of the tables is abysmal. I would like to change databases eventually, but I do ...
0
votes
0answers
27 views

Converting MySQL master-master replication to master-standby

I set up two mysql servers in a master-master configuration. This was working fine until recently when I encountered a duplicate-key problem. After doing some research and evaluating my needs, I ...
0
votes
0answers
15 views

Timeout too long on SQL Server 2012 Linked Server to MySQL

We have a statement in a SQL Server 2012 stored procedure that is an INSERT into a temp table from SELECT using OpenQuery to pull data through a Linked Server from a remotely hosted MySQL database. ...
1
vote
1answer
38 views

Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?

I have to move a given database of 100gb from server a to server b and later this year to server c with a copy for testing to server d. So all servers are Unix (mostly Debian) with MySQL. The ...
0
votes
1answer
42 views

How to get number of locks acquired by my MySQL Query?

How to get number of locks acquired by my MySQL update query? Is it possible using MySQL Command Prompt or MySQL Workbench? Example query : update employees set store_id = 0 where store_id = 1;
0
votes
0answers
21 views

Indexing Multiple Possibly Missing Columns

I'm working with a particularly large database, and am not particularly in tune with some of the intricacies of RDBMS's as I work primarily in PHP/WP and with smaller databases. Either way, I have ...
0
votes
1answer
18 views

How to tackle myPHP Admin localhost error [closed]

I was working on a database using mysql workbench which i forward engineer to phpmyadmin. It was working earlier then unfortunately i got this error. . I have already changed the localhost port but ...
0
votes
0answers
26 views

Career Database Design

I am new in cakephp, I want to develop a simple career website, I have design the database, but I would like to show it to professionals and know if the structure is ok Jobs - id - job_title - ...
1
vote
1answer
38 views

MySQL select with join table

I have 3 tables, one of them is join table: user table: CREATE TABLE `user` ( `id`, `name`) media table: CREATE TABLE `media` ( `id`, `value`, `type` enum('M', 'T')) user_media table: CREATE ...
0
votes
1answer
41 views

How do I move a MySQL data directory to an external hard drive?

I tried moving MySQL data directory to an external Hard disk (which has been formatted using NTFS). I followed the steps given in the answer to the question How to change MySQL data directory? Stop ...
-1
votes
0answers
14 views

How to connect a website to database [closed]

I designed my website and the database by I am getting trouble to connect. I would like you to help me how can I connect my website to a database. I designed it using Php and the a the database using ...
5
votes
2answers
80 views

Why do so many queries have aliases? [closed]

I've spent a lot of time searching for, researching and implementing various complex MySQL queries over the last several years. Many of them use lots of aliases for tables, even when none are ...
0
votes
0answers
30 views

How to interact with a foreign key in database [migrated]

I have been working on a database for sometime now and i got stocked a particular section. I am trying to write a code to control the foreign key column in a database. mysql is the back-end and Java ...
0
votes
0answers
20 views

Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

I am using MySQL with PHP for printing details from a database. I tried to make a new user, which was successful, although I get an error from MySQL when I tried to fetch data from it. It showed me ...
1
vote
1answer
21 views

Services don't have MySQL Server. How to run it?

I need to run MySQL Server on a new for me laptop. There's Windows 7. And MySQL have been installed on it. In order to verify this, I opened the Programs and Features window and saw it there: ...
0
votes
1answer
37 views

Mysql How to insert a variable as field value in a table

I have created a variable named hash as a password hash. How can this variable be inserted a a field value in a table? hash = pbkdf2_sha256.encrypt("password", rounds=200000, salt_size=16) ...
0
votes
1answer
23 views

Copy a Large INNODB table in MySQL

I have an INNODB table that's > 93 million rows. A lot of the data is considered "temp" data and is governed by an "is_active" flag of 1/0. When a user updates a form, new data is written with an ...
0
votes
0answers
30 views

Comment_ID in wp_comment for new posts too long - comments fails [closed]

i am new to this forum so please excuse if I am missing something important here (I took the 2 minute guide tour though!). Since 2 weeks I am experiencing a bug for new incoming comments on my latest ...
0
votes
2answers
20 views

Show sql statements from mysql binlog (GTID)

I have mysql binlogs for replication through GTID. I'm trying to show executed update/insert statements like this: mysqlbinlog --base64-output=DECODE-ROWS mysql-bin.000024 But all I see is ...
0
votes
1answer
13 views

MySQL Trigger: Can you turn a query updating multiple columns to multiple queries where each update one column?

Here's what I'm trying to archive: use a trigger to divide an update query which updates more than 1 columns into several update query and each of the query updates just 1 columns. For example, the ...
0
votes
0answers
14 views

How does mysqlslap calculate average number of seconds to execute all queries when number-of-queries specified?

Let's say I have 10000 queries (q1,q2,q3....,q10000) and want to test the queries performance using mysqlslap with number-of-queries option along with 100 concurrent sessions(c1,c2---c100) and one ...
2
votes
2answers
24 views

Identify slow query without slow query logs in mysql server

I am wondering is there any other way to to check our slow queries without logging slow query. Suppose, I have a highily busy server can't afford to log much to save memory and I/Os. Then, is there ...
0
votes
2answers
21 views

Unable to remotely access MySQL

I am experiencing problems with mysql 5.1 at the moment and possibly due to that I am unable to connect. The port that I am using for mysql is open (http://www.yougetsignal.com/tools/open-ports/) ...
-1
votes
0answers
16 views

Update local DB to online DB once a Day [closed]

I'm really facing this problem. I'm having one project with lot of local client and large Database. Here Net connection is very dead slow. So I want upload my latest updated Data to Online server. ...
0
votes
1answer
16 views

MySQL Cluster node utf8

I have configured MySQL Cluster (5.6) with two data nodes and managment node. Problem is that I cannot put special chars - looks like encoding is not set to utf8/utf16. I logged into each node and ...
0
votes
1answer
14 views

Working with variables in stored proc

I want to create a meta table on the fly using a stored pdocedure and passing a table prefix as "in" parameter and then build the final table name somehow. My code looks like this: SET @table_ = ...
0
votes
0answers
15 views

Searching a keyword from multiple tables using my querry , [migrated]

I want to search "law" from three tables tbl_books, tbl_books_author and tbl_books_subject. I am running following query. SELECT * FROM tbl_books p, tbl_books_author d, tbl_books_subject m WHERE ...
0
votes
0answers
32 views

When performing an UPSERT, how to keep track of which rows were inserted vs updated? [closed]

This question is not necessarily specific to one particular database platform, but I'm looking for an answer for any of one of the following databases: MySQL PostgreSQL SQL Server Oracle MongoDB ...
0
votes
2answers
41 views

How to get several specific records from a query result?

I know by using Like with "LIMIT 1, OFFSET x" I can get the Xth record from a returned query result. But what if I want to get X, Y, and Z all at once? Currently I do a for loop and it's like I'm ...
0
votes
0answers
27 views

Is doing an online alter on a MySQL table to add comments safe?

Is doing an online alter on a massive MySQL table to add or edit table or column 'comments' safe? Or do you need to take precautions like you would while adding, removing columns, etc on that table?
0
votes
1answer
23 views

How to mimic a full outer join using mysql views?

I have all kinds of views in mysql with employee data. I have tried to use methods like this -http://stackoverflow.com/questions/2384298/why-does-mysql-report-a-syntax-error-on-full-outer-join but ...
0
votes
1answer
31 views

What is the most efficient way to exclude records with a particular ID in a MySQL query for random records?

I have an api endpoint that returns X amount of random posts from a table called "posts". This endpoint is used by a mobile app. It retreives random posts by doing a SELECT COUNT(*) on the posts table ...
0
votes
1answer
13 views

What does MySQL “USE INDEX()” without any arguments do?

Does the USE INDEX() have any effect here? SELECT `posts`.`id` FROM posts USE INDEX() where `posts`.`size` > 1024; (I have it presently in some SQL because of the way the query is ...
0
votes
0answers
14 views

MySQL ignores ZWNJ character in string comparison

If you add a unique index to a char columns you can not add two string that differ only in having ZWNJ characters (e.g. 'فا' and 'ف‌ا'). However I need to store both of them. How can I overcome to ...
1
vote
1answer
19 views

Unable to update table after creating an After update trigger

I have a table like this /*Table: pageprivilege*/ ------------------------ /*Column Information*/ ---------------------- FIELD TYPE COLLATION NULL KEY DEFAULT Extra ...
0
votes
0answers
22 views

select with a multiple row in pivot table [migrated]

I really don't know how to retrieve a specific row from a pivot table. Here's my pivot table: +----+-------------+--------+ | id | peticion_id | tag_id | +----+-------------+--------+ | 1 | ...
0
votes
1answer
35 views

Unknown sticky Problem after MySQL upgrade

few weeks ago we upgraded mysql server from 5.5 to 5.6 on 1st server few days ago (5May) I reboot mysql server , after this customer reported that some database data table not load to their site . ...
1
vote
1answer
31 views

how would i merge a column where matches a different column? [closed]

It's very similar to the below post How to merge column in mysql depending on match table user Merge customer_id from table user to table cust where customers_firstname AND customers_name ...
0
votes
2answers
12 views

Import/Exporting certain columns of a table across two databases and excluding duplicate emails in mysql

I have run into a problem with mysql queries: Basically, I have two databases that both contain a table called tblclients however db1 has far more records than db2 and there are some duplicate ...
0
votes
1answer
24 views

MySQL Join is the same as Cross Join?

I'm learning mysql. Under all cases, is Join the same as Cross Join? For example, this query SELECT * FROM table t1 JOIN table t2 Will always be the same as SELECT * FROM table t1 CROSS JOIN ...
0
votes
0answers
22 views

weird auto inc generating id in mysql

I'm creating a tableB and generating auto-inc as 600000000 for the table. ) ENGINE=InnoDB AUTO_INCREMENT=600000000 DEFAULT CHARSET=utf8 A trigger inserts to this table whenever an update happens ...
0
votes
0answers
12 views

I want to sync local mysql database and live server mysql database

My plan is to store data in my local MySQL database and after a time interval or when system connected to internet it will update my live MySQL database remotely Is it possible? I'm have a inventory ...
0
votes
0answers
22 views

Promo Codes - should I create a separate table or add a code column to a join table for Students and Courses

I'm creating a promo code and invitation system and I want to understand the best way to structure the database to include the Promo Codes. This is what I have currently: User: has_many Courses ...