mysql-workbench

Why does SQL workbench always return a row full of null values in every query?

时间秒杀一切 提交于 2020-08-24 05:08:59
问题 Every query has a final row with an asterisk beside it and null values for every field? Why does this show up? I cant seem to find an explanation for it. Even putting a WHERE clause doesnt seem to get rid of it. Is this only happening to the MySQL implementation alone? 回答1: It is for inserting a new row, you enter the values there. 回答2: Are you sure it's not just the data entry row. Usually when viewing the table data in something like Workbench or SQLYog, it will display the rows of data,

Why does SQL workbench always return a row full of null values in every query?

纵然是瞬间 提交于 2020-08-24 05:08:31
问题 Every query has a final row with an asterisk beside it and null values for every field? Why does this show up? I cant seem to find an explanation for it. Even putting a WHERE clause doesnt seem to get rid of it. Is this only happening to the MySQL implementation alone? 回答1: It is for inserting a new row, you enter the values there. 回答2: Are you sure it's not just the data entry row. Usually when viewing the table data in something like Workbench or SQLYog, it will display the rows of data,

Error Code: 1822. Failed to add the foreign key constraint. Missing index for constraint 'ekdromes_ibfk_1' in the referenced table 'pwlhseis'

北城余情 提交于 2020-07-20 03:44:21
问题 I have these two tables: create table pwlhseis( ma int, hmeromhnia date, wra time, hmer_diek date, ae_po int, amka_po int, constraint foreign key (amka_po) references pelates(amka), primary key (ma)); And: create table ekdromes( ae int, diarkeia int, proorismos varchar(20), kostos float, timh float, afeteria varchar(20), hm_enarkshs date, primary key (ae)); Then: alter table ypallhloi add constraint foreign key (arithmos_up) references grafeia(arithmos_g); alter table ekdromes add constraint

Declare variable syntax invalid in MySQL Workbench?

北城余情 提交于 2020-07-18 08:56:04
问题 I am trying to create and set a variable: DECLARE myId INT; SET myId = 5; However, I am getting invalid syntax complaint in MySQL Workbench: SQL syntax error near 'DECLARE myId INT;' I have tried the following variants: DECLARE myId INT(4); SET myId = 5; DECLARE @myId INT; SET @myId = 5; DECLARE @myId INT(4); SET @myId = 5; What is wrong? 回答1: As in the comment says Declare is only valid into stored programs like procedures, functions. here you have an example of a store procedure and its

errno: 1251, sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client

限于喜欢 提交于 2020-07-17 13:58:39
问题 I'm creating the simple api project in nodejs. For that i have installed mySql workbench with version 8.0.11. I have created config file, dbConnection.js file and in the dbconnection.js file i have written the following code : var mysql = require('mysql'); var path = require('path'); var config = require(path.resolve('./', 'config')) var connection = mysql.createConnection({ host: config.databaseHost, user: config.databaseUser, password: config.databasePassword, database: config