MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
13 views

How do you create a 'shadow' database in mysql

A while back, a friend told me of a tool that would allow us to "shadow" a production database using a local database. The term shadow may be incorrect (so please correct me if so) What I ...
1
vote
1answer
53 views

Ansible: How to change MySQL server root password by reprovisioning the server

I have provisioned my server with Ansible playbook. I've used the root/bedrock-Ansible playbook. One of the tasks was to set up mysql server together with mysql root user password. Now I urgently ...
0
votes
1answer
18 views

Nested set model: retrieve sub-tree containing nodes that match condition

I'm using the "nested set model" (the backend used by our web application is CakePHP and the Project model uses the TreeBehavior). This is my "project" table: +----+-------+-----------+-----+------+ ...
0
votes
0answers
21 views

Should I use nvarchar after I set all database utf8? [closed]

I set my whole database UTF8 by this command: ALTER DATABASE databaseName CHARSET utf8 COLLATE utf8_unicode_ci; So, should I use still nvarchar or varchar? varchar seems working for me. Beside ...
0
votes
0answers
28 views

Export MySQL Database with version compatibility

I'm trying to move a MySQL database out of my Win 2012 server & onto a shared hosting web server (Linux). I'm having problems importing the database (which imports fine into other hosted packages ...
0
votes
1answer
17 views

Run MySQL replication by schedule or on demand

I have a master-slave replication currently configured. I know this setup runs real time. Is it possible to sync only the databases on schedule (daily or weekly) or by demand? Thanks!
0
votes
0answers
11 views

how to export mysql database in xammp [closed]

I was getting error massage to export mysql database in xammp so please give me the address .i tried but can't access the export file in database on phpmyadmin
0
votes
0answers
9 views

Is it possible to import a CSV file into MySQL using VB.Net? [migrated]

I would like to know if it's possible to use LOAD DATA LOCAL INFILE via VB.net to import a CSV given a path to the CSV.
2
votes
1answer
68 views

How to write a query, with multiple foreign key in mysql

I am working on a simple PHP and MySQL college level clinic management system. There 4 main table which relation with foreign key. I'm little bit confusing multiple foreign key in table .. what would ...
1
vote
3answers
15 views

Optimizing MySQL query with left joins

Ok, so first off i am going to provide a bit of information on the database structure I have 3 indexed tables that are used in this query (though one of them should probably be a weak entity, but ...
0
votes
1answer
47 views

Select Multiple Values from Same Column; one sql statment and split into separate columns

This post derives from following - Select Multiple Values from Same Column; one sql statment Based on this query - SELECT user_id,GROUP_CONCAT(meta_value ORDER BY id) FROM t WHERE meta_key ...
1
vote
3answers
46 views

SQL self join with condition

I have table like: bu_id bu_name parent_id 1 DefaultBU NULL 601 bu1 1 602 bu2 601 603 bu3 NULL 604 bu4 603 I want to retrieve the ...
1
vote
1answer
19 views

“Remote” connection to a local MYSQL database on LAN

I have a mySQL (5.5.38) server running on my desktop (windows 7), I can connect just fine into any of the servers Users, and skip-networking is off when checked via show variables. I am trying to give ...
0
votes
1answer
36 views

Migrate Jira to MySql - Unknown system variable 'storage_engine'

I'm migrating JIRA in Windows from HSQL to MySQL and I got stuck with the message Unknown system variable 'storage_engine'. Though I created a backup, installed MySQL and copied J connector to libs ...
0
votes
1answer
52 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
30 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
6 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
19 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
40 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
47 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
28 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
18 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
43 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
23 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
45 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
82 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
26 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
39 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
2answers
21 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
16 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/) ...
0
votes
1answer
19 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
2answers
44 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
28 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 ...