mysql-workbench

MySQL writing on a text file

老子叫甜甜 提交于 2019-12-10 11:28:52
问题 I'm trying to write data on a text file on MySQL workbench 5.2.45 in a Macbook Pro with Mountain Lion OS 10.8.2; and I get the following mistake: "Error Code: 1. Can't create/write to file '/Users/JohnnyDahdah/Desktop/datos2' (Errcode: 13 - Permission denied) 0.001 sec" My code is the following: select * from Datos into outfile '/Users/JohnnyDahdah/Desktop/datos2.txt'; 回答1: Unless the server is running as you then it does not have permission to write into your home directory. You could

MySQL Workbench - Forward Engineering - Error 1005: Can't create table (errno: 150)

坚强是说给别人听的谎言 提交于 2019-12-10 10:31:35
问题 I am on MacOSX using MySQL Workbench 5.2.45 I have designed a database using the EER Diagram functionality and then tried the forward engineering to generate my database to put on my local server. I get the error code: Error 1005: Can't create table (errno: 150) SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS

How to run a .sql file as part of a MySQL Workbench 6.2 query?

天涯浪子 提交于 2019-12-10 10:28:14
问题 I'm using MySQL Workbench 6.2 [Windows7] and I want to create a script with all my steps. Among the steps, I have a series of .sql files stored from on my computer that create and populate tables. I want to run these files from the query tab but every time I use this command: source C:/Users/[username]/Desktop/sampdb/create_president.sql; I get an Error 1064, which says "Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for

Declare syntax error in MYSQL Workbench

风格不统一 提交于 2019-12-10 03:49:27
问题 How can I declare and set a variable in my MYSQL WORKBENCH in a stored procedure? It gives a syntax error like unexpected Declare_sym at the first line with a cross sign. I am using the following code for it: Declare StartDate datetime set StartDate = '2013-07-01'; 回答1: After some googling, I got my answer. A Declare statement must be in between Begin and End statement. Additionally, it must be the first statement after the Begin statement. I got the answer from this wonderful site. 来源: https

MySQL ERROR 1005: Can't create table (errno: 150)

夙愿已清 提交于 2019-12-10 03:22:27
问题 I am trying to create the following table create table messaInScena ( data date, ora time, spazio varchar(20), spettacolo varchar(40), postiDisponibili smallint, prezzoIntero decimal(5,2), prezzoRidotto decimal(5,2), prezzoStudenti decimal(5,2), primary key (data, ora, spazio), foreign key (spazio) references spazio(nome) on update cascade on delete set null, foreign key (spettacolo) references spettacolo(titolo) on update cascade on delete set null, constraint RA3_1 check (postiDisponibili >

How can I execute SQL queries that take longer 99,999 seconds on MySQL Workbench?

强颜欢笑 提交于 2019-12-10 03:12:26
问题 UPDATE: the issue is now fixed. I would like to execute a query that takes more than 99,999 seconds to execute (e.g. SELECT SLEEP(150000); ). To change the timeout in MySQL Workbench, we have to go to Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds) . However, the DBMS connection read time out field only accept up to 5 figures, and setting the field to 0 is equivalent to the default parameter (600 seconds). If the query takes more time than the timeout, I get the

Creating a database with MySQL Workbench from existing schema/model

拈花ヽ惹草 提交于 2019-12-10 01:52:41
问题 I built a database schema (or Model?) with MySQL Workbench . I'd like to now make it into an actual database. I've seen Forward and Reverse engineer options and can't find a clear answer on if either are what I need. How can I turn this into an actual database? 回答1: This for mysql workbench version 6.0 and for exporting a schema . Select tab MySQL Model Select File->Export->Forward Engineer SQL Create Place a file name to be exported in the Output SQL Script File, choose your options, next

Not retrieving schema list from source when migrating from MSSQL to MySQL using Workbench

a 夏天 提交于 2019-12-10 00:44:54
问题 I'm trying to migrate my database which is in MS SQL Server to MySQL, I'm using Workbench to do so. I get connection to both databases but get the following warning: Retrieve schema list from source. And this is the message log: Starting... Connect to source DBMS... - Connecting to source... Connect to source DBMS done Check target DBMS connection... - Connecting to target... Connecting to Mysql@74.5.3.2:3306... Connecting to Mysql@74.5.3.2:3306... Connected Check target DBMS connection done

MySQL Error Code: 1205. Lock wait timeout during update with inner join

家住魔仙堡 提交于 2019-12-09 12:14:29
问题 I am trying to update the Time_Stamp field in my table, simple_pack_data , to match the values in the similarly titled field in my temp_data table. The tables each have fields called Test_Number and Time_Marker , which I'm using to INNER JOIN the tables. Time_Marker is like a reading count, where Time_Stamp is an actual time from the start of the test. I want to update the Time_Stamp one test at a time, so the code I have been trying is: UPDATE simple_pack_data s INNER JOIN ( SELECT * FROM

MySQL Workbench 6.3.5 crashes when opening XAMPP MySQL local database

[亡魂溺海] 提交于 2019-12-09 03:40:38
问题 I installed XAMPP for Windows (xampp-win32-5.6.14-4-VC11-installer) and am not able to open mySQL database. Here are the versions: XAMPP Control Panel v3.2.2 MySQL Workbench 6.3.5 Doing a standard TCP/IP connection at 127.0.0.1 on port 3306 username: root password: not set yet, it is blank When I click on TEST CONNECTION the MySQL Workbench crashes: Edit It looks like this version is not compatible with MariaDB which is a forked version of MySQL I believe that XAMPP is using nowadays: 13:52