mysql-workbench

Linking MySQL Workbench to my Remote Server

痞子三分冷 提交于 2019-12-04 12:07:29
问题 I've just downloaded MySQL Workbench. But I don't quite understand how to syn this with the databases on my remote server. Work bench asks for "hostname" so I provided the hostname of my remote server. I designate port 3306. I then provide a username. This is the username I use when I log into PhpAdmin -- should I be using a different one? Then I provide a password, again the same one I use for PhpAdmin. But this doesn't work. Oddly, the error always tells me my user name is: username@current

Lost connection to MySQL server at 'reading initial communication packet', system error: 61

丶灬走出姿态 提交于 2019-12-04 09:38:09
3 days on this and have hit a wall. I'm running mac os x. I have installed the mysql-5.5.14-osx10.6-x86_64.dmg. As far as the context, I need to install the mysql gem for use with ruby on rails and that won't install properly unless there is a valid instance of mysql running. I've tried using the /Library/StartupItems/MySQLCOM/MySQLCOM [start|stop|restart] method to start the mysql server and it comes back with no errors, but when I try to connect to localhost via the MySQL Workbench, it always says: "Your connection attempt failed for user 'root' from your host to server at localhost:3306:

MySQL workbench table data import wizard extremely slow

走远了吗. 提交于 2019-12-04 08:58:53
问题 I need to import a csv file with 20 million rows and 2 columns into a database, but when I try to do this with MySQL Workbench's data import wizard it is extremely slow, probably is going to take 1 month to finish, looking at the progress bar. There has to be some faster way to do this, I hope. 回答1: Always use Load Data Infile as a first attempt for huge sets of data. Mysql Manual page on Load Data Infile. Wrote up several answers for this question, but for a peer comparison, see this guy's

How to backup MySQL with MySQL workbench automatically

时光怂恿深爱的人放手 提交于 2019-12-04 08:33:28
Guys I'm using MySQL Workbench . Is there a way to use it to backup my database automatically? The correct answer is There is no backup scheduling/automating option in MySQL Workbench as of 6.2. You can do manual backup in version 6.x by clicking on DataExport under Management. See below: MySQL WorkBench Data Export Import http://community.discountasp.net/showthread.php?t=11972 Making a backup in MySQL workbench is a pretty easy task, but it can be hard to find exactly where to do it the first time around. Typically when you're working in MySQL Workbench you will be using the SQL Development

MySql workbench CHECK constraint [duplicate]

戏子无情 提交于 2019-12-04 08:24:28
This question already has an answer here: CHECK constraint in MySQL is not working 8 answers Here I want to create 2 CHECK constraint before the record insert to the database. ALTER TABLE SubjectEnrollment ADD CONSTRAINT register CHECK (register <= classSize AND register >=0), ADD CONSTRAINT available CHECK (available <= classSize AND available >= 0); register attribute should not more than classSize attribute and less than 0. available attribute should not more than classSize attribte and less than 0. When I type in this syntax in MySql Workbench, it complaints "Syntax Error: unexpected

How to generate the whole database script in MySQL Workbench?

喜你入骨 提交于 2019-12-04 07:39:21
问题 I want to take the whole database. Where do I find the database file? And is there a way to write the whole database with all data to a text file (like the one in SQL Server)? 回答1: Q#1: I would guess that it's somewhere on your MySQL server? Q#2: Yes, this is possible. You have to establish a connection via Server Administration. There you can clone any table or the entire database. This tutorial might be useful. EDIT Since the provided link is no longer active, here's a SO answer outlining

MySQL Workbench Error 1175 Even With a “Where” Statement

匆匆过客 提交于 2019-12-04 06:57:29
问题 I am running MySQL Workbench 6.3.8 b1228 CE (64-bit) in "safe update mode". I am trying to run a query with a "WHERE" statement, but it still returns "Error 1175" Here is my query statement: DELETE FROM `my_db`.`table_name` WHERE `email` = 'john@smith.com'; (Obviously "my_db" and "table_name" are placeholders.) Why would Workbench throw Error 1175 for this query when I have the most basic of "WHERE" statements included? 回答1: In Sql by default safe options is enabled which restricts the user

Forward Engineering MySQL Workbench Error 1064

喜欢而已 提交于 2019-12-04 06:41:40
问题 I made a EER diagram and I am trying to Forward Engineer it but I get this error and I can't find the mistake. Executing SQL script in server ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX fk_User_Wallets1_idx ( Wallets_idWallets ASC) VISIBLE, CONSTRAINT ' at line 13 SQL Code: CREATE TABLE IF NOT EXISTS `mydb`.`User` ( `idUser` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NULL

Add constraint on values , Mysql

巧了我就是萌 提交于 2019-12-04 05:31:51
问题 My table CREATE TABLE STUDENT ( BCN INT not null, Stname varchar(50) not null, Sex char(1) not null , primary key (BCN)); I want to make Sex attribute just accept two values 'F' or 'M' I've try 'check' clause : Sex char(1) not null check (Sex = 'F' or Sex ='M' ) but doesn't work, the Sex column still accept other values like ('B') ! and I've try to create trigger : DELIMITER $$ CREATE TRIGGER SexCheck BEFORE INSERT ON student FOR EACH ROW BEGIN IF Sex <> 'M' and Sex <> 'F' THEN SIGNAL

Is it possible to save MySQL Workbench files as plain XML?

坚强是说给别人听的谎言 提交于 2019-12-04 04:18:16
DB Designer had a lot of bugs but one outstanding feature was that database models were saved in plain XML by default . This allowed a user to diff file versions via SVN or Beyond Compare , easily finding any changes made to the database. Unfortunately, DB Designer's succsssor, MySQL Workbench, stores files in a proprietary MVW file format , which is unreadable. Is it possible to force MySQL Workbench to save as XML? Oskar No, the current version (5.2.10 beta) does not support that. However, the file format is not proprietary - its a simple zip archive. It contains a single XML document which