MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
325 views

MySQL users corrupt

I have a strange situation here: From time to time I cannot log in with any of my mysql users. I even cannot make a mysql dump. So I started searching in mysql files and I found that users.MYD and ...
0
votes
1answer
11 views

call mysql function by string name

Can i call a mysql stored function from another mysql stored function or stored procedure, passing a string to the first function which is the name of the second function to call. I.e choosing the the ...
0
votes
1answer
66 views

Replace missing data in mysql database

I have a database that is generated from a csv file and it contains time stamps in it, the timestamps are sometimes missing from the database at certain hours, so i need to get in data from the ...
2
votes
0answers
10 views

Full text search results in a large amount of time spent in 'FULLTEXT initialization'

I'm currently trying to run some queries against a data dump of Stack Overflow's comments. Here's what the schema looks like: CREATE TABLE `socomments` ( `Id` int(11) NOT NULL, `PostId` int(11) ...
9
votes
5answers
13k views

Restore mysql database with different name

How can we restore mysql database with different name from mysqldump file. I dont't want to open dump file and edit it. Any other better methods?
0
votes
1answer
105 views

Using non-replicated read/write databases on a MySQL slave server

I have a MySQL slave server that has two databases being replicated from a master. What I'd like to do is add a third database that I will exclude from replication and use as a read/write database. ...
0
votes
3answers
1k views

How to join two result sets from same table with different conditions on same column?

select * from unit_of_measure; +--------+-----------+--------+------------+--------------+-----------------+-------------+---------------+------------------+ | uom_id | uom_name | symbol | created_by ...
0
votes
0answers
3 views

ubuntu - Pm2 mysql high cpu usage

Not sure what is going on here but would love some help if any can. I am running on digital ocean 1GB ram ubuntu server a node.js application that is is launched with pm2 and that uses a mysql ...
1
vote
1answer
18 views

How to take backups of MySQL databases, explicitly based on PyMySQL

I am looking for a purely Python solution to take backups of every MySQL database on localhost. I already use PyMySQL to run queries on these databases. Any help is highly appreciated. EDIT After ...
2
votes
1answer
30 views
+100

Converting Heap to MyISAM issue

At work we have a problem that has now occurred more then once. Problem is that query is in state of converting HEAP to MyISAM and it paralyzes our server( query in this state is not able to kill ...
2
votes
1answer
2k views

Extract MySQL information from a compressed tar.gz file

I have a back up-of a MySQL database which is contained in a .tar.gz file - I need to restore it. I've never had to do this before. The only way I can access the database is through phpmyadmin. There ...
0
votes
1answer
80 views

A single, simple update takes 10+ seconds

We are running MySQL 5.1.71-log and have a table with 2.7 million rows. Simple updates to it are regularly taking more than 10 seconds to execute. The table structure is: CREATE TABLE `person` ( ...
1
vote
1answer
12 views

How to filter maximum results entries

I have a mysql table table name 'results' Reg.No SubjectCode Attempt Grade Marks 112108 CMIS 1113 1 D 17 112110 CMIS 1114 1 A 85 112119 CMIS 1114 1 D ...
0
votes
1answer
87 views

List all mysql reocrds in a master table and last record in a related child table

I want to list all records in a mysql master table and last record in the child table that is related to the master. Here is my code $strsql="SELECT contact.id, contact.title, contact.init, ...
1
vote
1answer
536 views

Mysql Deadlock on update query on same row

My server is experiencing occasional deadlocks on two update queries on same row both using index (primary key). The conflicting queries are: UPDATE auth_user SET rep_score=185 WHERE ...
1
vote
1answer
440 views

Calculating the median value in a MySQL table with CodeIgniter

This is my model file in codeigniter. I need to calculate the median for this variable: budget_breakdown.breakdown_grants. How can I do this calculation? function reports_details1() { ...
1
vote
2answers
186 views

How can I integrate a new system to a design scheme I previously created?

This is a follow-up to a question I wrote a while ago, for reference, you can look it up here. I've developed a curriculum based database scheme that looks like this(Thanks Joel Brown) Now that a ...
1
vote
1answer
334 views

MySQL slave stuck at 'System lock' most of the time, high CPU usage

Let me describe what we are facing now: We have a MySQL Master-Slave, Row Based Replication setup and at the moment, the slave is stuck with a perpetual System Lock. The Master is an active server ...
0
votes
1answer
222 views

Nested query not recognize external table

i need to a query that show week by week the total amount of imports of any company and in addition add a ranking position depending on that amount. I've made this query but the problem is the inner ...
2
votes
1answer
18 views

MySQL WHERE if NULL select another column

This is my mysql table id date_created date_active 1 2014-06-07 18:24:38 NULL 2 2014-06-07 18:24:38 2014-06-07 18:24:38 3 2014-06-07 18:24:38 ...
1
vote
1answer
25 views

MYSQL query to find records between two date range

I am working in a web application using PHP and MySQL. I have two tables Employee employee_id email_id 3 tl1@jasmine.com 4 agent1@jasmine.com 5 ...
2
votes
1answer
130 views

Best Indexing Strategy for Query with Equality[A], Range[B], Group By[C], AND Order By[count(P)]

I have a poorly performing query: SELECT user_id, count(item_id) as count FROM table items WHERE category = 'magazine' AND created_at > 1384754400 GROUP BY user_id ORDER BY count(item_id) desc ...
2
votes
1answer
29 views

Sorting Table and get Position of row

I have a Table with 3 rows. Player, Time, Server. Now, I want 2 things and I don't know how. For Server there are 3 worths available. 1, 2 and 3. Server and Player are a Primary Key together. User ...
0
votes
2answers
109 views

why does mysql query running slower on server?

select glpi_tracking.id AS gi, glpi_tracking.date AS gdate, glpi_tracking.closedate AS cdate, glpi_tracking.contents AS gc, glpi_followups.tracking AS gft, glpi_followups.date ...
1
vote
1answer
16 views

Finding out the exact size of the database after inserting records?

I have this query: SELECT table_schema "db.name" , Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema; Does this ...
2
votes
1answer
274 views

Best Practices for Creating and Deleting Records in MYSQL

I'm fairly new to working with databases, but I've currently have a webCrawler that I've written in C# using MYSQL database. The crawler is frequently writing and deleting records from the database ...
2
votes
1answer
23 views

What is the difference between select and fetch time?

In this article MySql vs MongoDB performance benchmark, they defined two measurements: select time run time (select + fetch) I do not understand what the difference is between these two. Can ...
1
vote
1answer
36 views

SP how can I sum the amount of all leftchild in parentid

I have this data and table structure,I am creating MySQL stored procedure to sum all the amount in the leftchild of the parentid, I don't have enough knowledge in stored procedure.and I need some help ...
0
votes
1answer
85 views

Can a slave with a dynamic ip update the master

How can I setup mySQL replication in such a way that a slave on localhost with dynamic IP can update the master as well as get updates from the master which has a static IP. The slave will not be ...
1
vote
1answer
9 views

Upgrading mysql percona server from 5.5.40 to 5.6.71

2014-12-26 05:18:20 13215 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure 2014-12-26 05:18:20 13215 [ERROR] Native table ...
1
vote
1answer
10 views

MySQL replicated tables for Cognos BI

the Business Intelligence guy is asking for faster machines, latest software etc. and some of his customers are complaining of query times in excess of an hour. The tool is Cognos/Insight and the DB ...
0
votes
2answers
84 views

Mysql 5.5.25 must be restarted to connect

We have MySQL v5.5.25 running on Windows Server 2008 R2. Occasionally people are unable to connect, and the only way we have found to fix this is to restart the mysql service. This happens every 2-3 ...
0
votes
1answer
99 views

getting “table is full” error even if the table size is much smaller than tablespace

Currently I am using MySQL NDBCluster 7.3.5. I have created one UNDOFILE hhme.dat with INITIAL_SIZE=200m. Also one tablespace hhmefep_tbs with DATAFILE hhmefep_tbs.dat having INITIAL_SIZE=500M ...
1
vote
2answers
411 views

Trying to recover/import/transfer database from MySQL data dir

I used phpMyAdmin->export to create a backup of my database but I have now discovered it did not export the whole database, some tables was missed/refused. However at the time of doing the export I ...
1
vote
1answer
137 views

Mysql - Select To XML

I'm Building Audit Trail with Trigger, and want to convert the inserted / updated / deleted value into XML and store it into another table. my trigger look like this: DELIMITER $$ CREATE ...
1
vote
1answer
15 views

Only InnoDB databases locking up

I'm trying to troubleshoot my MYSQL in a LAMP and have an interesting situation. At first I thought MYSQL itself was locking up, but it turns out to be ONLY innodb databases that are locking up. ...
0
votes
1answer
727 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 ...
1
vote
1answer
142 views

MySQL: IF statement check is a table exists

I run in the following issue and can't figure out how to resolve it. delimiter # create procedure pr1() begin declare v1 double default 0; start transaction; ...
1
vote
2answers
21 views

How to get the sum of a particular item id in a column

Item ItemName PackageID Specifics brandname GRNQty UnitPric GRNValue 102814742801 ALL BRAN FLAKES 1PKT Bran. KELLOGS 7 15.9 111.3 102814742801 ALL BRAN ...
1
vote
1answer
17 views

Mysql binlogs exists, show binary logs is empty

I am working on a replication setup and have turned on bin-logs. I have moved my mysql datadir to a new location as well as the binlog path From my.cnf datadir = /vol/data/mysql ...
1
vote
1answer
19 views

mysql query from 1st domain and insert in 2nd domain

i have data in one of my website and i want to print these data in other site.these two are in same server.at present i have to export mysql data and import into other then do this code to insert in ...
0
votes
1answer
222 views

phpmyadmin not working after mysql update

i followed this guide to update my mysql form 5.1 to 5.5. After lots and lots of command and headache, i was able to upgrade mysql. i checked the version via terminal. But now there is another ...
0
votes
1answer
885 views

Mysql enable remote connection in centos,my.cnf does not have bind-address to comment out

I am trying to make my mysql server running on centos to allow remote database connections.I am reading this article http://xmodulo.com/2012/06/how-to-allow-remote-access-to-mysql.html that says i ...
0
votes
1answer
356 views

How to start mysqld with read-only data directory?

I'm trying to start MariaDB in a docker container, using a data directory from the host mounted read-only. MySQLd is of course shut down on the host. Unfortunately, even with adding the read_only flag ...
1
vote
1answer
85 views

Reviewing relational database tables

I am building a database, but I am a little bit confused with my table relationships. I wish someone could help review my table relationships below for me and tell me where I am going wrong. I have ...
0
votes
1answer
260 views

selecting records that are 3 days from expiring datetime

I have a table that contains a datetime timestamp. What I am looking for is to select records that are exactly 3 days from the 30 day expiration based on the datetime timestamp. Here is what I have ...
0
votes
1answer
25 views

MySQL InnoDB Deadlock For 2 simple insert queries

I have a deadlock for this two insert queries: insert into PlayerClub (modifiedBy, timeCreated, currentClubId, endingLevelPosition, nextClubId, account_id) values (0, '2014-12-23 15:47:11.596', 180, ...
1
vote
2answers
149 views

MYSQL joining 3 tables with left join

I have these tables: pupils: (id_pupil, name, surname, email, user, pass, level, class) incidents: (id_incidents, date, time, type_incident, comments, id_pupil, id_user, subject, id_trimester) ...
0
votes
1answer
73 views

MySQL-How to find that value in a column is subset with all other values in same column multiple time

I have a table named as Team where table contain 3 column (ID,Team,Task). Its datatypes are (INT,VARCHAR(255),INT). Below you will find a sample table where I would like to perform the query on column ...
0
votes
0answers
12 views

Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\installation\framework\database\driver\mysqli.php on line 134 [on hold]

I try to restore my backup joomla site from live server into local site. I using akeeba and kickstart. in local, I use whamserver 2.5 Anyway, at the stage: Database restoration, there is an error. ...