MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
6 views

SQL error: Unknown column in 'where clause'

I have following very simple PHP MySQL Query: $sql = 'SELECT * FROM bundesland WHERE bkuerzel = ' . $_GET['q']; $result = mysql_query($sql, $con); When I execute the query with a click on a item ...
0
votes
0answers
3 views

MySql – Get comma separated values from a table, should not exist in another table

I have two tables, table structures as below. Table: items Id item_name item_ids 1 pens 10,11,12,13 2 books 20, 30 3 computer 50, 60, 80 Another table : ...
0
votes
0answers
10 views

SELECT that is null if there is one more register in this date that is not null

I'm trying to make a query that I can't produce... This is my table capturainfo captureid int(11) userid int(11) date date dateinit datetime datefin datetime I need to select ...
-1
votes
1answer
13 views

Query error int/varchar LEFTJOIN

Can someone tell me what´s wrong with this query? $sql = "select bans.id as banid, bans.type, bans.data, bans.reason, bans.expire, bans.added_by, bans.added_date, players.id as playerid, ...
0
votes
1answer
10 views

MySQL - Changing from system tablespace to file per table

The MySQL database I am working on has the InnoDB tables and indexes stored in the system tablespace which is now > 20Gb. Some years ago I managed a MySQL database that made use of a file per table ...
0
votes
0answers
20 views

Big difference between id value [duplicate]

I have this database table where I insert multiple results during 1 action. In php I have a submit button when pressed, inserts 1-50 rows(depending on the user input). I've got a foreign key in this ...
1
vote
2answers
46 views

How to speed up mysql export and import

I need to perform a DB migration from Server A to Server B. Server A: MySQL version installed 5.0.6 Server B: MySQL version installed 5.6.20 OS: Both are running RedHat Linux 64bit. 16 ...
0
votes
0answers
19 views

11.2GB text file import MySQL or PostgreSQL

I am out of my depth a bit perhaps but submit this query hoping someone has some experience importing large (11.2GB) tab delimited text file (2.2GB tar.gz file) into either MySQL 5.5.41 or PostgreSQL ...
0
votes
2answers
31 views

How can I use 'system pwd' command with MySql CONCAT() function?

How can I use 'system pwd' command with MySql CONCAT() function? I tried select concat('test', system pwd); gives me ERROR 1583 (42000): Incorrect parameters in the call to native function ...
-3
votes
0answers
20 views

I cant find compiled versio of mydumber for mysql backup in windows [on hold]

I cant find mydumper (compiled) for windows, please dont address me for not compiled for windows . thanks
0
votes
4answers
30 views

Remote MySQL connection fails (10060) - “Can't connect to MySQL server on domainname.com(10060)”

I have developed one application in vb6, and i am using online MySQL database server for storing my application's data. So when i am try to connect with my database server,when first time i connect to ...
0
votes
1answer
10 views

list of items or menu in mysql workbench

i am creating a database for an android tourism app. i am working on MySQL workbench, i want to create a menu in my database, for example i want to list the cities of my country, or list the ...
0
votes
1answer
40 views

query slows down exponentially as table grows

I have the following query running on mysql 5.6 on my CENTOS server select tb1.field2, tb1.field1, tb2.field1 from dns.table1 tb1, dns.table2 tb2 where tb1.field2 = tb2.field2 and tb1.field1 != ...
1
vote
0answers
26 views

MySQL 5.1.73-cll and engine MyISAM PRO AND CONS FOR THE FOLLOWING 2 'DELETE' APPROACHES [on hold]

For MySQL 5.1.73-cll and engine MyISAM what are the pros and cons for the following two possibilities of 'deleting' rows(let's say that a user want's to delete his profile/delete some of his products ...
0
votes
1answer
20 views

MySQL:How much aprox disk space required for bin_log of the 80GB of DB?

I had total 80GB of database in MySQL server,and there is huge amount of trasaction are happend on daily basis,I need to be enable a bin_log so I required a recommendation how much disk space is ...
0
votes
1answer
20 views

How to limit the range of an insert-update to only look at certain rows/ rows with field value: X?

I posted something similar before, but am still unsure of the technical implementation --- I'm so close to being there to the finished product. I have a table of tickets, and a stream of ticket ...
0
votes
1answer
30 views

Combining multiple rows into single column

The return from my MySQL statement displays an example below: id 1 | status | id 2 | name | category 001 | open | 011 | john | person 001 | open | 011 | john | male How would I combine the ...
0
votes
0answers
8 views

Determine parent id when moving hierarchical data to different tables?

I've got several tables which contain category and tag relationships for different posts. I'm trying to move the categories from the posts table into their respective tables while maintaining their ...
0
votes
1answer
29 views

Database Design Question? Relationships and Form Data

I am working on a project that requires to store evaluation form data. Essentially, the a reviewer will fill out a form based on the performance of the person being evaluated. Now there is well over ...
0
votes
1answer
19 views

All users are having NO Privileges in phpMyAdmin

By mistake, I changed all the privileges of user 'root' in my MySQL Database. Not even a single privilege is having for that user. Now if I log in with another user I am able to access only one ...
0
votes
0answers
7 views

MYSQL Thread Historical Data

We had to force a restart on our database server today and we're now trying to find out what the server was doing at the time of the shutdown. In our error logs we have found 5 instances where the ...
0
votes
1answer
4 views

Mysql connect without username/password

I build a new website for a client (WordPress is underlying) and have access trough FTP to his webspace. He does not provide or even know more informations than this because he had taken it from an ...
1
vote
1answer
20 views

Migrating Oracle to MySQL: MySql Workbench Not Available

I am currently trying to migrate information from a query of a remote Oracle database to a local MySQL database. I have poked around and have found it has been frequently suggested to use the ...
1
vote
3answers
19 views

mysql import failed caused by overgrown general log file

I have a table about 70G in size. I took a backup using mysqldump. In the new server, I performed a restoration. time mysql -uroot -p TDB < TDB.sql Enter password: ERROR 3 (HY000) at line 58155: ...
0
votes
1answer
20 views

MySQL script writing slow

I'm using php and the exec() function to run 2 MySQL script files one after another The first file has approx 2k update statements (see below) in and is 114kb in size. UPDATE table1 SET is_active = ...
0
votes
1answer
20 views

auto increment for the table with 1000 of records in mysql

How to reset auto increment for the table with 1000 of records in mysql. I want it to start counting from 1 again.
0
votes
1answer
16 views

Shell script for partial table backup

I have multiple database in my MYSQL server and i want to take some particular tables backup from each database. can anyone help me in writting a shell script for this scenario.
0
votes
3answers
43 views

How do I do an outer join between all nested subqueries? (getting an error of 'OUTER' is not a valid input for this position) [on hold]

I have this query: SELECT AVG(a.score) AS Average1, AVG(b.score) AS Average2, AVG(c.score) AS Average3 FROM (SELECT subfactor.score, dateID, EmployeeID FROM employeescore LEFT JOIN ...
-3
votes
0answers
24 views

Hi this is my requirement can you help me?

Student sid name address phno 1001 abc nellore 1342425 1002 xyz allur 98876545 mark sid m p c 1001 45 34 34 1002 62 13 78 fee sid fee 1001 ...
0
votes
1answer
33 views

Query results that not are in previous query result

I want to retrieve from my table the id_product of the products which haven't got some attribute and it's value is not the ones i want For example i want the id_product of the products in which ...
1
vote
3answers
47 views

MySQL: List databases with tables

Is there a way to list all my databases with tables in a single command? Expectation: mysql> SHOW DATABASES, TABLES; DB1 table1 table2 DB2 table1 table2 table3 ...
0
votes
0answers
12 views

maxscale read/write split with mysql [on hold]

I am setting up mysql MMM with two slaves. I will use slaves for read only and master for writes only. I do not have read/write split in application. I came across maxscale program. I was wondering if ...
2
votes
1answer
34 views

BLObs – Should I Store In Database Or in Directory Structure?

BLObs – Should I Store In Database Or in Directory Structure I have been developing a database to replace an ageing data structure that contains 1000's of files within a directory structure. The ...
1
vote
2answers
46 views

Stored procedure to check if username exists

I'm trying to write a stored procedure So far I have this, but it always returns 1 CREATE DEFINER=`root`@`localhost` PROCEDURE `USER_EXISTS`(IN `USERNAME` VARCHAR(64) CHARSET utf8mb4) SELECT CASE ...
0
votes
1answer
29 views

How to pass the input parameters to dynamic Pivot stored procedure

This Is My Query: DELIMITER $$ DROP PROCEDURE IF EXISTS `leavemanagement`.`SP_ViewAttendance` $$ CREATE PROCEDURE `leavemanagement`.`SP_ViewAttendance` ( IN in_branch_id varchar(10) ) BEGIN ...
1
vote
1answer
34 views

Merge multiple columns into one column in different table?

I've done this before, but I don't remember how. I need to select all rows from several columns in one table and insert them into one column in a different table while keeping them all on separate ...
0
votes
0answers
6 views

When will store procedure/functions support result set as return type

I have noticed that MySql doesn't support result-set on a store procedure and functions, which means return a table. So I can't do things like CALL sp_my_store_procedure() ORDER BY id ASC; Or ...
0
votes
2answers
11 views

Compare values in SQL having dots

I'm comparing values from two different database. In one table the name is stored with dots(i.e A.B C) and in another table the same value is stored as AB C(i.e in second table none of the names ...
-1
votes
1answer
14 views

restore mysql 5.0.77 backup to mysql 5.5 [on hold]

I am having backup of mysql version 5.0.77. I want to restore backup of 5.0.77 to our new machin having mysql version 5.5 What is the procedure?
0
votes
0answers
9 views

i want to get Hierarchical structure of category and subcategory for nth level in one mysql query

i want to get Hierarchical structure of category and subcategory for nth level in one mysql query. i try some solution but it's not work properly. i try following query but it only get only ...
0
votes
0answers
26 views

MSSQL - Creating backup of 1 day worth of data and then merge them to make a full database [on hold]

I am new to this forum let me know if there is any update to be made. Use-case: I would like to create a snapshot daily which would have 1 day worth of data for 7 days and then combine it with ...
0
votes
3answers
31 views

Prepopulate database with empty / null values [mysql]

What would be the best way to pre-populate a database with 100 empty fields and then begin the Auto_Increment? What I mean to say, I want to reserve the first 100 userfields (ie UIDs which are ...
0
votes
2answers
24 views

MySQL replication - how to read from slaves? manually?

MySQL Manual - Replication: "Scale-out solutions - spreading the load among multiple slaves to improve performance. In this environment, all writes and updates must take place on the master ...
0
votes
0answers
9 views

What is the best way to implement user accounts and privileges? [on hold]

I am wanting to make a website with user accounts, but am not sure what the best way is. User accounts require security and i'm not sure how to approach it, I know I could use a database username and ...
1
vote
1answer
21 views

MySQL Replication Master Slave Architecture - Web app that is based on the SLAVE DB

We are developing a web application (Spring mvc based app) that uses a MySQL DB. (lets call it the "original app") The DB architecture uses a MASTER-SLAVE configuration with replication. The web app ...
0
votes
1answer
13 views

Adding a column to aggregated data where new value only applies to a subset of the aggregation

Having trouble explaining this. I have a table like this: Label | Value A | 3 B | 1 C | 4 And another like this: Label | Value | ID A | 1 | ID1 A | 1 | ID2 C ...
0
votes
1answer
11 views

MySQL Replication, Can i add a trigger to the SLAVE db?

Is it possible to do so? The trigger will insert some rows into a unique table that exists only on the slave.
0
votes
0answers
39 views

Very high CPU caused by mysql service

A running mysql service uses CPU in a crazy way. (See attached screenshot from htop) I followed the instructions here with no luck. My server specs: CPU: 1900Mhz . Intel Hexa-Core Xeon E5-2420 ...
-3
votes
1answer
22 views

MySQL Insert Performance

i've been tasked to check whether MySQL can be used for Large DataWareHousing Requirement is as following the Table contains 83 column each row pay load size is 1272 bytes the requirement is the DB ...
0
votes
1answer
66 views

Select the last massage for each user [closed]

Please help me with a query. I know, that my english is not even on basic level, but I try to explain. I want to write a query that selects every last massage from each user (I want to create a dialog ...