MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

-3
votes
1answer
49 views

How to organise huge mysql database for emails and search through it

I wanted to ask you for your opinion, what would be the ultimate and the best way to store million of emails and search on them, using MySQL. So first the product: You have tons of emails, which ...
0
votes
1answer
27 views

MySql Insert signal if where clause fails

As part of a chained sequence of transactional queries, I'm inserting values that exist in a temporary table into a new table. Every query is validated for errors in PHP using: if ...
1
vote
1answer
49 views

Trying to restore users/passwords for a MySQL server

I had a system failure, but I managed to save the /var/lib/mysql library on my linux system. I have since rebuilt a new Linux (Ubuntu) system (LAMP). I copied the old /var/lib/mysql/mysql folder to ...
1
vote
2answers
29 views

MySQL “case as column” question in WHERE clause

I'm setting up a new column with this case statement: SELECT * , CASE t2.field_max_occupancy_value WHEN 'one' THEN 1 WHEN 'two' THEN 2 WHEN 'three' THEN 3 WHEN 'four' THEN 4 WHEN 'five' ...
0
votes
3answers
30 views

Error trying to SET a field when two fields in different tables match

I am trying to set catid to 584 whenever the rows in the tables ykz2d_crmery_deals and ykz2d_maps_integration have the same company id using the following query: UPDATE ykz2d_maps_integration SET ...
1
vote
1answer
44 views

Why conditioning before and after join, gets different results?

I want to left join two tables and then return some of the records. My first query was: SELECT * FROM card LEFT OUTER JOIN user_card ON card.id = user_card.card_id WHERE card.package_id =14 AND ( ...
0
votes
1answer
21 views

Best approach to compare specific columns of 2 tables in different databases?

I'm running an application who does have a shorten version of a table in the backend database. Both application- and backend-tables are having the same primary keys and some specific key columns. ...
1
vote
1answer
24 views

Is there another/better way to create and maintain large amounts of procedures?

So I've decided to take a step back, and scrutinize the way I implement procedures on my databases. I'll list what I have done, give my reason for doing so and hopefully I will be told that I'm a ...
0
votes
1answer
24 views

Showing all values when at least match a given one

Given three tables items, genres and itemGenres; how can I filter out the items that have at least the given value while also outputting the rest of its genres. With this data INSERT INTO items ...
0
votes
1answer
41 views

Filter from the same user times

i have a table with user id-s, and many times for the same users, like this: id time 1 13:00:01 1 13:00:01 2 13:00:09 1 13:00.23 1 13:00:24 2 13:00:11 2 13:00:11 I ...
1
vote
3answers
36 views

guideline for calling optimize table after alter table?

Should I be calling 'optimize table' when changing datatypes of columns, adding indexes or dropping indexes, assuming a table with millions of rows, heavily used, both for reading and writing ...
1
vote
0answers
20 views

Mysql binlog warnings [closed]

My system happens to write a lot of unsafe statements to the binlog and the result is a lot of IO wasted. I found that turning the warnings off in the log fixes the problem but i was wondering if ...
0
votes
1answer
21 views

Talend collation issue in mysql

I am using Talend to backup MSSQL TO MYSQL Server. Everything goes well, I have a connection, data flows from one db to the other... however I cannot correctly copy diacritic signs. On MSSQL I have ...
2
votes
2answers
37 views

How can I Search for a string in all fields across all tables of a MySQL database?

I want to find a string and I don't know exactly which column and which table. How can I find it? Thanks.
2
votes
1answer
18 views

Why to mysql stored procedure updates twice?

I have this stored procedure: DELIMITER $$ CREATE PROCEDURE updateTrendContentStats(IN mongoid VARCHAR(255),IN numericid INT,IN points INT,IN ctype INT,IN activity INT,IN created INT) BEGIN DECLARE ...
0
votes
1answer
14 views

MySQL database dump bombs out Error 1064 when using LOCK TABLES

This specific machine is running MySQL version 5.0.27. I have tried to get a full dump of this database several times and each time it bombs out. Tried getting just a structure dump of it and this is ...
0
votes
1answer
36 views

Multiple left join where not in another table

I have the following tables (there is more detailed data in each one, I just put the minimum to create a sample): __________ _____________ _____________ _____________ | person | | provider | | ...
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
40 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
15 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
34 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
59 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
20 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 & ...
3
votes
1answer
97 views
+50

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
49 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
10 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 ...
0
votes
0answers
15 views

Error 1911 'STATS_PERSISTENT' [closed]

When I run the code mysql -u root -p < cpt-all-db.sql and then enter my password I get the error code ERROR 1911 (HY000) at line 6609: Unknown option 'STATS_PERSISTENT On line 6609 this is the code ...
1
vote
1answer
18 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 ...
0
votes
0answers
25 views

Error 1248: Every derived table must have its own alias [closed]

Please see my code, below. I get the error: Error 1248: Every derived table must have its own alias What am I doing wrong? CREATE PROCEDURE `insert_seance` (IN compared_id INT) BLOCK1: BEGIN ...
1
vote
0answers
28 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
69 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
38 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
16 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 | | ...
0
votes
0answers
26 views

Why are some MySQL console commands not working? [closed]

I'm learning how to manage MySQL stuff from the command line on Windows right now, and I've got a question. I keep reading how people use (via Windows' CMD) show databases, but whenever I enter that ...
1
vote
0answers
31 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
39 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
13 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
25 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
16 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
32 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
44 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 ...
-1
votes
0answers
20 views

problem in creating slave in localhost xampp [closed]

I have already created master on another machine and now I am creating the slave. I have added these lines in my.ini: binlog_do_db = new_db server-id = 2 # # The replication master for this ...