MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
24 views

Is there an equivalent in postgresql to MySQL's “safe update mode” or “safe delete mode”?

Is there a configuration or flag in PostgreSQL I can turn on to disable bulk updates and bulk deletes, similar to MySQL's "safe update mode" or "safe delete mode"?
0
votes
1answer
12 views

Mysql: Create a view with multiple self joins without duplicates in result

Just to clarify i can't change the tables structure, so please leave out the "you should change your tables to this and that" answers, thank you. So i have a table entities_attributes_values where an ...
0
votes
0answers
21 views

How to get one result with multiple data in other table [migrated]

My problem is this. I want to put table1 in combo box with one result with different data from table2. I hope you can get my point.. sorry.. :) My tables: This is my coding. ...
2
votes
1answer
47 views

DB Schema design : single table with more columns vs multiple tables with fewer colomns

What would be better DB design for a social network website. A single table with more columns and less rows or multiple table with fewer columns but more rows. For example: User can post an update on ...
0
votes
1answer
20 views

Unable to show binary logs how to remove logs from mysql?

Server version: 5.1.50-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show binary logs ; PROBLEM Data directory is full I want to remove ...
0
votes
2answers
16 views

How to check innodb history list length?

The output for show engine innodb status has the history list length as a number, but that output is hard to parse, and there's just too much data when all you want is a single value. Is the value ...
0
votes
1answer
35 views

How to insert multiple values in a specific field in a table using mysqli?

I am working on a project and I I have a scenario like this: I have many field in my table : table_name : transaction_tbl -id -name -description -ref_number : text(datatype) In my inserting here is ...
0
votes
2answers
63 views

How can i update my database from another database using temporary tables?

I want to update tables of my database using another big database every day with using temporary tables and without returning result. How can i update it? This my temporary table : use data_pro; ...
1
vote
1answer
21 views

How do I get the MySQL binary log coordinates from the binary files?

I'm attempting to set up replication for a large (120 GB) MySQL database and I messed up. I shut down the master, copied the data files, and restarted the master. Now I've set up the slave & ...
4
votes
1answer
104 views

MySQL loading NULLs in numeric columns

MySQL 5.6.23, InnoDB I am loading tables from character delimited text files using the LOAD DATA INFILE commnd and I would like every field with a \N, which is the NULL character in this setting, to ...
1
vote
2answers
51 views

How is MySQL using an index when doing a case sensitive comparison?

I noticed that Ruby on Rails (ActiveRecord) was using the BINARY operator for a case sensitive comparison. Yet, when I look at the EXPLAIN for this, MySQL can still use the appropriate index for a ...
0
votes
1answer
14 views

Connection to a MySQL server fails after server restart

Until this morning I could connect via Sequel Pro to one of our networked machines that has the MySQL server on it. Today, however, it's another story: when I am trying to connect, it times out. Even ...
1
vote
1answer
20 views

MySQL Read/Write Benchmark

I'm trying to benchmark Read/Write speed in MySQL 5.5. Currently I have a stored procedure that insert rows with random numbers to a table and I'm measuring time of execution before and after ...
1
vote
0answers
29 views

Mysql master slave performance

Im running a mysql database on a linux server with 24gb ram and im trying to run a performance test of my system. Now the thing is, when im running it without a slave replication and in particular, ...
3
votes
0answers
71 views

Why the stored procedure is much slower than a temporary table?

I want to do the updating of my database every day and I will like to use stored procedures but the time of execution of the temporary table is faster than the stored procedure. How can I optimize my ...
-3
votes
1answer
48 views

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

On my local WAMP stack things are working perfectly. When I upload the database on GOdaddy.com, this error shows up. Warning: mysqli_connect(): (HY000/1045): Access denied for user ...
1
vote
1answer
22 views

To find out the sum total of GRNQty and GRNValue of particular item from column 1

Query 1 # SELECT spi.Item,spi.ItemName,supdd.PackageID,spi.Specifics,iteb.brandname,supdd.Qty AS GRNQty,supdd.GP AS UnitPrice,(supdd.Qty * Supdd.GP) AS GRNValue FROM suppdeldetail AS supdd ...
1
vote
1answer
17 views

Root Remove Remote % host. My SQL

So i accidentally made it so root can be accessed anywhere remotely how do i revoke the % privilege. Using mysql. +-----------+ | host | +-----------+ | % | | 127.0.0.1 | | ::1 | | ...
3
votes
1answer
60 views

MySQL trigger after insert with insert and delete instructions does not work properly

I have the following trigger created in phpMyAdmin: Table: tb_agenda Time: AFTER Event: INSERT BEGIN INSERT INTO tb_realizacao (dt_agenda, titulo, ...
1
vote
1answer
44 views

comparing ip and subnet (ipv4 and ipv6) - mysql

How can I check if an ipaddress is part of a subnet, given ipaddress can be ipv4 or ipv6? I currently have it working for ipv4 only: set @ip = '1.1.1.1'; set @subnet = '1.1.1.0/32'; set ...
0
votes
0answers
17 views

HELP - removing JDBC boilerplate code with java 7 and up [migrated]

Online examples of JDBC exhibit fair amount of code-clutter, compared to RAII/C++ or Python DB. Don't we all want something less verbose? :) So, in the spirit of trimming things a little, is the ...
1
vote
0answers
14 views

Mysql Connector C++ data retrieval question

So, the result of a query is stored in a ResultSet. And that type has multiple methods for data retrieval such as getString, getInt etc. I'm curious how the data is stored in that object. Is all the ...
3
votes
1answer
71 views

MySQL Join When Record in Joined Table Does Not Exist

How I can join two tables when record in joined table doesn't exist. I'm tried something like this: SELECT Confessions.ID, Confessions.WriteTitle, Confessions.WriteArea, ...
1
vote
0answers
28 views

Mysql Trigger use inserted value as column name for update After Insert

I have 2 tables: One for storing order_products and another one for keeping inventory levels for multiple stores The order_products table keeps the ID for the store in the store_id column. ...
2
votes
1answer
16 views

Mysql Connector C++ statement values question

I just want to know, if a value, like an int for example, is actually converted into a string before being sent as part of the command. pstmt = con->prepareStatement("INSERT INTO test(id) VALUES ...
0
votes
0answers
20 views

MySql stored procedures are not atomic (JDBC)?

I have a stored procedure with one UPDATE and one INSERT in its body. I call the SP with a single executeQuery(...) wrapped within a try-with-resources. The DB connection is set (by default) to ...
-2
votes
0answers
10 views

I want to move the listbox one to another listbox and update the particular listbox value [migrated]

Here, Below i used the code. I am new in VBA. I am trying to move the one list box to another listbox, but I am not able to update the database table. I am struggle on few days. Why this error came ...
0
votes
0answers
33 views

How to retrive deletes Mysql table data back?

I accidently delete data from mysql but i want it back. I am fedora operating system is use for installing Mysql. Please help ASAP because data is very critical
0
votes
0answers
48 views

MySQL - high CPU usage (MyISAm tables) in LAMP

I have a LMAP stack running on Centos 6.6. Here is the detail which may help. # cat /etc/redhat-release CentOS release 6.6 (Final) MySql version # rpm -qa | grep -i mysql ...
0
votes
0answers
45 views

How can i add index in MYSQL stored procedure?

I can not use alter table () on my stored procedure i don't have a permission to do that in the big database data_pro. How can i use index in my stored procedure for my 2 fields in where condition? ...
1
vote
1answer
35 views

MySQL v5.1.73 - can the binlog_format betweem Master & slave be different?

We are in the process of testing MySQL replication before using it in production. The MySQL is being setup by Puppet in our case and I noticed that the binlog_format setting is different between ...
0
votes
2answers
55 views

After Exporting Database should be empty

I am exporting data from database for that I have written following query: SELECT ParameterID, Name,Type,Datatype,LogDate FROM Param_Ems WHERE DataType = 10 INTO OUTFILE 'C:/tmp/ParamData.csv' FIELDS ...
1
vote
1answer
130 views

Why is my stored procedure very much slower than the same MYSQL query?

My stored procedure is very slow compared to a normal query or a temporary table. How can I optimize my stored procedure? CREATE DEFINER=`datasll`@`...` PROCEDURE `product`() BEGIN EXPLAIN ...
0
votes
2answers
58 views

Is it redundant to set your primary key as a unique key?

I'm putting tables together in MySQL workbench and I'm currently ticking my primary keys to also be uniquely indexed. Is this a redundant configuration?
0
votes
0answers
37 views

Design database schema for membership application with fees and purchases

My membership application needs to record payment of membership fee, card fee and misc. fee for each member. I also need to record purchases of each members and payments for the purchases.
0
votes
2answers
28 views

EC2 and setting up MYSQL Replication

my database size is very big around 100gb and when I restore it takes 3 days to restore. I am using amazon ec2. My question is I want to setup a new slave to MYSQL master, can I take a snapshot of ...
2
votes
1answer
20 views

Starting MySQL with SSL option using systemd

Can someone explain how to start a MySQL server with SSL options enabled using systemd? I've generated certificates and edited the my.cnf file to enable SSL but I'm not sure how to restart MySQL so ...
2
votes
0answers
40 views

Storing phone number in E.164

TLDR; If I store a phone number in MySQL(or any DB with equivalent constraints), would the correct format be E.164 values into a VARCHAR(32) field? Have been reading up on format/storage of ...
1
vote
0answers
16 views

Unique ID for related records in a MySQL Table

I have a requirement to allocate a unique RecordID (ImportID) to multiple rows in a table. We are importing a text file which contain related transactional information but variable record types and I ...
2
votes
0answers
39 views

innodb update with limit locks all matching (ignores limit)

For a query similar to this: UPDATE myinnotable1 SET value=5,updated=now(),status=1 WHERE status>10 AND message="match msg" LIMIT 1; I found that innodb engine locks ALL rows matching criteria ...
3
votes
1answer
41 views

Confused by GRANT ALL PRIVILEGES ON *.* (…) WITH GRANT OPTION

Normally I manage users on my databases via phpMyAdmin, but since I do everything else in standalone programs such as SQLyog or HeidiSQL, I wanted the ability to manage users remotely from these ...
2
votes
1answer
48 views

Query to determine start and end dates based on time overlap

Given the following data: id | user_id | started | closed | dead ------------------------------------------------------------------------------------------- 7714 ...
1
vote
1answer
20 views

Cleanup orphaned records

I have two tables in MySQL: orders and line items. When orders are deleted, the line items are orphaned. Thus, I need a query that will delete the line items that were associated with the order ...
0
votes
1answer
14 views

SQL BCP Utility Writing to SSMS Insead of .csv File

I have a stored procedure in SSMS call sp_testInventoryIssues as follows: USE [ADMIN] GO /****** Object: StoredProcedure [dbo].[sp_testInventoryIssues] Script Date: 06/19/2015 16:02:29 ******/ ...
2
votes
1answer
53 views

Table structure for voting app

I have an app where a user votes between two local profiles on which one is better. I want to ensure that the same user cannot vote more than once between the same two profiles (say the user votes on ...
0
votes
1answer
24 views

store text differences

I want to store text differences in MySQL. Let's say I have a text, 500 characters or so, and then someone edits the text. I want to be able to reconstruct both the old and new text. From a database ...
3
votes
1answer
25 views

Get problem with Binlog_Do_DB in Master configuration

I have followed all the rules for replication. The steps are I have changed the my.cnf file. My db name is new_db. server-id = 1 log_bin = D:/xampp/mysql/mysql-bin.log binlog_do_db = new_db Grant ...
1
vote
1answer
55 views

How to select second last row from table?

Table Name :- ModelParam_EMS Primary Key :- ParameterID No of Rows :- 500 want to select 499th row from table only. Note :- No. of rows can be less or more but not fixed. Create Table :- ...
0
votes
1answer
50 views

.ibd file is missing and alter table discard tablespace crashing the server

Data file(.ibd) for one of my mysql table is missing in data directory. As read in some articles i want to resolve the issue by discarding tablespace first ,import the tablespace (cfg file of said ...
1
vote
1answer
60 views

How to select max value faster from large size table

I have query SELECT max(ParameterID) FROM modelparam_ems Table Name: modelparam_ems No Of Rows: 9000 It takes time to retrieve max value of parameterId, ParameterId in Unique value. Output Time ...