Questions tagged [mysql-workbench]

1

votes
1

answer
46

Views

“Packet for query is too large” error. Where to change max_allowed_packet variable?

I am having a problem, I imported a spring boot project from git, the code is working perfectly fine in my teammates computers, but I get an error That I don't know how to solve, while running my java application I get this error : Packet for query is too large (1072729 > 1048576). You can change th...
Taoufiq Benallah
1

votes
2

answer
30

Views

MySQL returns wrong results with the BETWEEN clause

I am using the following query to get data from mysql database and I get wrong data. I want to show release_year from 1990 ~2000, but it's showing me everything. SELECT title,release_year FROM FILMS WHERE release_year BETWEEN 1990 AND 2000 AND budget > 1000000000 AND language ='Spanish' OR language...
LenaLD
0

votes
1

answer
22

Views

How to get Data of last 7 days

I am trying to get data of the last 7 days but my code is not working. Getting 'DATEADD function does not exist'. I have a date in this format: 2019-03-05T10:59:09.2996542+00:00 SELECT * FROM finaltest1 WHERE CAST(Date AS DATE) > DATEADD(DAY, -7, CAST(GETDATE() AS DATE)) ;
A500010
1

votes
1

answer
2.2k

Views

How to search values in table in Mysql Workbench?

I am using Mysql Workbench v 5.2.47 CE. I cannot find any option to search in a db table using GUI. In phpMyAdmin, there is a Search button, that shows form with all table columns, so I can filter the search results according value in some columns. IS there any alternative in Workbench? I really ca...
tomas.teicher
1

votes
3

answer
1k

Views

How select column names ,column data type, key column of a table in mysql

How select column names ,column data type, key column of a table in mysql by passing the table name. I am using mysql 5.5
java baba
1

votes
2

answer
673

Views

Forward engineer a Workbench model but with my own name for the scheme

How can I forward engineer a Workbench model with my given name of the database scheme? Yes I can edit it in the editor window shown on the image, but what if I have 30 tables to export as SQL code? Yes I can use find/replace tool before executing the exported SQL, but you can forget to use it and...
Vlad
1

votes
2

answer
1.8k

Views

Mysql - Drop table if exists not working

I try to use the following code to empty a database (delete all tables) : SELECT concat('DROP TABLE IF EXISTS ','`',table_schema,'`','.','`',table_name,'`',';') FROM information_schema.tables WHERE table_schema = 'DB'; I am getting an output of the commands, but nothing happens to the database. If I...
user3930853
0

votes
0

answer
18

Views

Express/MySQL not returning same value returned by MySQL Workbench

I have a query that is perfectly working when I run it on MySQL Workbench, but when I run it on Express it is returning me all the data on my database. Please help fix? PS. posted this before but didn't get fixed. --Client $.ajax({ url: '/filter', type: 'get', contentType: 'application', data: { ca...
Matthew
0

votes
1

answer
6

Views

Subquery Connecting unique ID to name trouble

I have two tables in question. I am trying to find the names of the pilots who had more than 3 hires assigned in 2018. taxiPilot Table p_id p_lname p_fname p_city 043 Smith John Dayton 044 Doe Jane Cincinnati Assignment Table p_id AT_id HireNo AssignDate City 043 BU...
gracer
1

votes
1

answer
23

Views

Print last month name in MySQL

Can anyone please help me in getting last month name in MySQL. I am getting the current month name using the query date_format(now(),'%M'), But I am not able to print the last month name by altering this statement.
1

votes
0

answer
36

Views

mysql not saving emoji correctly

I make a query using the mysql workbench to create a table and insert 1 record that contains a 4 byte emoji using: SET NAMES utf8mb4; CREATE TABLE IF NOT EXISTS tbl_message message_message VARCHAR(1000) DEFAULT CHARSET=utf8mb4; INSERT INTO 'tbl_message message_message VALUES ('Hello 🐬'); When I...
glennf
1

votes
2

answer
48

Views

SQL : Show date when product was present in 6 months of data

I am pretty new to sql but have a problem I can't seem to find an answer to yet. I need to find the month where the number of months a product in a certain segment showed up in a report is equal to 6. However, a product may not show up in sequential months, shows up multiple times a month, and som...
harvey_carmichael
1

votes
1

answer
37

Views

ODBC in VBA slowly breaking

I am using Windows 7 Professional on a 64-bit Operating System. I am using VBA in Excel and a MySQL ODBC 5.2ANSI Driver connection in SysWOW64 to connect and run queries in a MySQL Workbench 6.3 database. My macro runs a series of queries. It was working fine until the other day when some of the que...
haas
1

votes
0

answer
28

Views

Using MySql variables in UPDATE statement

Is it possible to have user defined variables, in an UPDATE query like this one. SET content = INSERT(content, @middle_n_pos, 0, ' the appended value '), @count_n := ROUND( ROUND( ROUND ( LENGTH(content) - LENGTH(REPLACE(content, '\n', '')) ) / 2 ) / 2), @middle_n_pos := LOCATE('\n', content...
Hype
1

votes
0

answer
19

Views

MySQL Function for permutations of comma seperated string

I need a query which can be used in (or as) a function and retrieves all combinations of n values. And I need all combinations of length k where k = 1..n. Extended sample input and result so input has 3 values instead of 2 - however, number of input values may vary from 1 to n. Example: Input: (Ann,...
Pravin Patil
1

votes
1

answer
33

Views

How do I search for multiple rows in a table or search from concatenated values?

I'm using MySQL and here is a DB table called 'profile'. Then my project requires me to perform some kind of 'advanced search' as below on the profiles. I can choose 'match any' or 'match all', then the field (Full Name, Email, etc), condition (is, is not, contains, does not contain, etc) and type t...
whatsup
1

votes
1

answer
82

Views

How to populate a data layer with an existing database from MySQL Workbench?

I am creating an MVVM WPF app and I have a problem trying to populate my data layer from the schema in MySQL Workbench.I tried to add an ADO.NET data model connected to an existing database with EF Designer,but when I want to populate it ,I get only 2 options which consists in Microsoft SQL Server a...
Eliza Maria
1

votes
0

answer
37

Views

Number of companies who started paying by how long it took them since signing up

In this, I want to record the number of schemes who started paying by how long it took them since signing up from Jan-17 till Dec-17, I wrote this query which it counts the number of companies who signed up 1 month ago(as per month) and not yet paid. SELECT YEAR(c.created_at) 'YEAR', COUNT(IF(MONTH...
ryan
1

votes
0

answer
771

Views

Unable to connect MySQL Workbench through SSH tunnel

I'm fairly new to using MySQL Workbench. I should also mention that I host my database in shared hosting. I was able to connect to my databases using Standard TCP/IP connection, but I would like something more secure. So I tried setting up the Require SSL setting for Standard TCP/IP, but even though...
user9382432
1

votes
1

answer
104

Views

How to get MySQL Server response after query execution (C#)

I'm developing a program in C# in which I make some inserts (load data infile) into a mysql table. How could I get the response the workbench shows me after each execution? I'm interested in the 'Message' column, the one that shows me all the warnings. Thank you!
Asier Azkolain
1

votes
1

answer
134

Views

Use direct connection from Java application to Mysql Workbench? Or create a Php/Java server between to deliver data?

I am developing multiple user desktop application in Java. I have modeled.implemented and populated my Database model in MySQL Workbench. I'm worrying about to do: How to get data from my database to my Java application? My application needs to be secure. Should I use the direct connection to MySQL...
Aziz Siyaev
1

votes
0

answer
39

Views

How to insert same id after insert update in c#

I'm trying to create an attendance project. I'm using update & insert in my code. Please check my code below. I know I'm vulnerable to SQL injection. My problem is when I tried to Time In using the same ID even if I use that same ID for time out, it displays the time out not time-in. Any idea how I...
1

votes
1

answer
34

Views

MySQL Error Code 1111: Invalid use of group function

I get error code 1111 when I try and print the celebrities who do not follow anyone. user (email, password, name, date_of_birth, address, type) primary key(email) celebrity (email, website, kind) primary key(email) follow (follower,followee) primary key(follower,followee) foreign key(follower) refe...
Omar Valenzuela
1

votes
4

answer
47

Views

filter out duplicates which actually aren't duplicates MySQL

So I have a database in which I have to search for duplicate records and it's going pretty well so far. However, since the data That I currently am using to check for duplicates has quite a few records where it is a null value. Therefore it considers them duplicates of each other while they actually...
A. Rakké
1

votes
2

answer
29

Views

MYSQL Query - Issue running query with a null row value

So I have been having trouble with this query. SELECT CR.rental_id AS 'RID', p1.rental_fee AS 'Guest Rental - RA', p1.clean_fee AS 'Guest Cleaning - RA', p1.tax AS ' Guest Taxes - RA', p1.damage_waiver AS 'Guest Damage Waiver - RA', p2.rental_fee AS 'PM Rental Fee', p2.clean_fee AS 'PM Cleaning Fee...
Jalal.Hassan
1

votes
2

answer
37

Views

How to select Top 3 users based on their points [duplicate]

This question already has an answer here: MySQL's alternative to T-SQL's WITH TIES 3 answers How can I construct a SQL as such that it will cater to the below scenario. UserID | point 001 | 100 002 | 99 003 | 98 004 | 98 005 | 97 Select top 3 score will be UserID | point 001 | 100...
momoni
1

votes
0

answer
21

Views

MySQL Script Applied to Many Databases

I have one MySQL script and many databases that the script is to be applied.Simplified script is like this. CREATE TABLE aaa1 AS SELECT * FROM dbname1.aaa ; CREATE TABLE aaa2 AS SELECT * FROM dbname2.aaa ; CREATE TABLE aaa3 AS SELECT * FROM dbname3.aaa ; ... CREATE TABLE bbb1 AS SELECT * FRO...
user2610861
1

votes
0

answer
58

Views

Update MySQL records from complex Select Statement

I have a relatively complex mysql statement that pages through a table of 1 million records 50 at a time (where $page = 50,100,150 etc) :- SELECT t.* FROM (SELECT sb_pageid FROM ailab_pages ORDER BY sb_pageid LIMIT $page, 50) q JOIN ailab_pages t ON t.sb_pageid = q.sb_pageid; I need to update...
Jonathan Lyon
1

votes
1

answer
488

Views

Mysql connector .net for mac

I'm a mac user and I have a project where I have to use C# and run queries where the data is stored in MySQL workbench. My friends who have windows told me that i should download mysql connector .net in order to establish the connection. But I can't seem to find one to download for mac. Is it possib...
Mariane Tarabay
1

votes
1

answer
482

Views

MySQL Error 2013: Lost connection to MySQL server during query

I've read all post with the same or very close headline, but still can't find a proper solution or explanation to my problem. I'm working with MySQL Workbench 6.3 CE. I have been able to create a database with several tables, and create a conexion with python to write data to it. Still, I had a prob...
puppet
1

votes
0

answer
296

Views

Cannot establish local connection MySQL Workbench

I have a problem connecting to my localhost mysql databse with Workbench. Using Debian 9, Workbench is installed from the apt's stable release package. Also I am running MySQL(MariaDB) and Apache2 server. Checked them both and both are running as services, both on the right ports. I have no problem...
Vlad Skurtolov
1

votes
0

answer
236

Views

Issues with connecting MySQL workbench with 1and1 Web Server MySQL DB

I have paid for a web server at 1and1. And I decided to use MySQL WorkBench. It asked for cred. in MySQL Workbench. Logging in phpMyAdmin I have the following information to use when making mySQL connection code. Server: dbxxxxxxxx.db.1and1.com via TCP/IP Server type: MySQL Server version: 5.5.59-0+...
Sky
1

votes
1

answer
18

Views

How to get the ERD to show more information?

I want to discuss about my db and the ERD I have, shows only the table column names, their types and the relationships between tables (in the static view). Is it possible to alter some setting and make it add more information(default value, foreign key relationships) to the ERD (The exported static...
SachiDangalla
1

votes
1

answer
73

Views

MySQL Workbench Query Stats: Server and Client Timing?

I'm running queries from the MySQL Workbench and it allows you to see the stats for each query. Part of these stats are 'Timing (as measured at the client side)' and 'Timing (as measured by the server side)'. I've included an example of what this output looks like. Timing stats from MySQL Workbench...
potentialchairs
1

votes
2

answer
46

Views

C# with crystal reports columns from different tables

I think this was simple for some C# masters here.. Language: VS 2010 C# Windows Application Database: MySQL Workbench CE Reporting: Crystal Reports I can generate a report from a single table but when I add a columns from the other table, the data of my report was becoming blank.. only the column na...
1

votes
1

answer
50

Views

Using CONSTRAINT alogn with FOREIGN KEY

I'm trying to understand the difference between creating a FOREIGN KEY this way: CREATE TABLE child( id_child INT NOT NULL, id_parent INT FOREIGN KEY(id_parent) REFERENCES parent(id_parent)); rather than this one: CREATE TABLE child( id_child INT NOT NULL, id_parent INT CONSTRAINT FK_id_pare...
Melolailo
1

votes
0

answer
32

Views

Interrupt queries execution from being finished

I have a problem with MySQL server when a user is firing multiple queries to retrieve a big Project (More than 10GB) from a server. the queries stop being executed after a certain time and the connection between the user and the server is being interrupted. Could it be that those queries require mor...
ahmed amine
1

votes
1

answer
78

Views

Need guidance in making mysql database model for basic chat web application

I am trying to build a basic chat application which will use PHP and MySQL. I have designed a model so far. please have a look. Now I have some questions. let me show quickly what I want to achieve please check this image - So in this image, there is a listing of all the conversations of the curren...
Rakesh Kohali
0

votes
0

answer
7

Views

How to restore the missing mysql db schema?

My DB schema is missing/deleted by someone without my knowledge from ASW EC2 windows machine. Seems some unauthorized user entered into the system illegally and did something. Since I can find some one tried multiple times to connect my DB and got failed with different usernames from the same IP add...
Prince
1

votes
2

answer
537

Views

Schema Changes after Dataframe Data insert into MySQL Table

I am new to Spark SQL, I am using DataFrame which has schema as below fields.add(DataTypes.createStructField(fieldName[0], DataTypes.StringType, true)); fields.add(DataTypes.createStructField(fieldName[1], DataTypes.StringType, true)); fields.add(DataTypes.createStructField(fieldName[2], DataTypes.D...
Asmi

View additional questions