mysql-workbench

Can't set lower_case_table_names in MySQL 8.x on Windows 10

≡放荡痞女 提交于 2019-12-01 17:56:02
In MySQL 8.0.12 running on Windows 10, it seems impossible to set lower_case_table_names to 2, so as to achieve the appearance of mixed case DB and table names in Workbench. I realize that under the hood these objects may remain lower case, which is fine. But I want it to look right in Workbench, and I could always achieve this in previous versions of MySQL. When I attempt to do that and restart the service so it takes effect, the service crashes and stops. In the mysql logs I see this: Different lower_case_table_names settings for server ('2') and data dictionary ('1'). Data Dictionary

mysqldump version Error while exporting data from MySQL

喜欢而已 提交于 2019-12-01 17:46:15
问题 I am getting an error while exporting data from mysql 5.5.29(winx-64) . I am using mysql workbench -gpl-5.2.45(win 32) . The error message is: **WARNING** Error checking mysqldump version Error retrieving version from mysqldump.exe: (exit 1) I am new in MySQL. 回答1: Check File->Edit->Preferences, Administrator tab. You need to provide correct path to mysqldump there, or leave field clear to use mysqldump.exe shipped with Workbench. 回答2: You have to start MySql Workbench as Admin. Rightclick on

Can't set lower_case_table_names in MySQL 8.x on Windows 10

蓝咒 提交于 2019-12-01 17:39:02
问题 In MySQL 8.0.12 running on Windows 10, it seems impossible to set lower_case_table_names to 2, so as to achieve the appearance of mixed case DB and table names in Workbench. I realize that under the hood these objects may remain lower case, which is fine. But I want it to look right in Workbench, and I could always achieve this in previous versions of MySQL. When I attempt to do that and restart the service so it takes effect, the service crashes and stops. In the mysql logs I see this:

ISDATE() equivalent for MySQL

被刻印的时光 ゝ 提交于 2019-12-01 17:20:12
I have a line of code for SQL server which takes a date listed as "YYYYMMDD" where the DD is 00 and converts the 00 to 01 so that it works with datetime. I would like to be able to use MySQL for it the current code which works for SQL server: INSERT patentdb.Citation(PatentNo, Citation, CitedBy, CitationDate) SELECT PatentNo, citation, WhoCitedThis, dt FROM ( SELECT PatentNo, Citation, WhoCitedThis, dt = CASE WHEN CitationDate LIKE '%00' THEN INSERT (CitationDate, 8, 1, '1') ELSE CitationDate END FROM patentdb.CitationSource ) AS x WHERE ISDATE(dt) = 1; but isdate is not valid in MySQL, what

ISDATE() equivalent for MySQL

南楼画角 提交于 2019-12-01 16:54:02
问题 I have a line of code for SQL server which takes a date listed as "YYYYMMDD" where the DD is 00 and converts the 00 to 01 so that it works with datetime. I would like to be able to use MySQL for it the current code which works for SQL server: INSERT patentdb.Citation(PatentNo, Citation, CitedBy, CitationDate) SELECT PatentNo, citation, WhoCitedThis, dt FROM ( SELECT PatentNo, Citation, WhoCitedThis, dt = CASE WHEN CitationDate LIKE '%00' THEN INSERT (CitationDate, 8, 1, '1') ELSE CitationDate

Change MySQL stored procedure 'Database Collation' name

∥☆過路亽.° 提交于 2019-12-01 15:48:57
I have imported a DB from Local machine to server machine. While importing the Database, the character set values of the DB are set by system default to "Latin". I have changed the character set to " utf8 " for the Database. But, the stored procedure of Database collation values are not modified. Currently it is " latin1_swedish_ci ". How to change the Database collation values from " latin1_swedish_ci " to " utf8_general_ci " for all the stored procedures. SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = DB_Name; USE DB_Name; ALTER

Change MySQL stored procedure 'Database Collation' name

試著忘記壹切 提交于 2019-12-01 15:33:09
问题 I have imported a DB from Local machine to server machine. While importing the Database, the character set values of the DB are set by system default to "Latin". I have changed the character set to " utf8 " for the Database. But, the stored procedure of Database collation values are not modified. Currently it is " latin1_swedish_ci ". How to change the Database collation values from " latin1_swedish_ci " to " utf8_general_ci " for all the stored procedures. SELECT DEFAULT_CHARACTER_SET_NAME,

Working with Events in MySQL

坚强是说给别人听的谎言 提交于 2019-12-01 13:27:18
I have a stored procedure which basically selects data from one table and insert into another table. Basically I am doing data archiving manually. Now, I want to write an event just like discussed here However, after reading that post and researching online, I came to know that it's not possible to create an event inside a stored procedure. Is there a way to accomplish my goal in MySQLWorkbench? I believe you are thinking this in the oposite direction: You can't create an event in a stored procedure, but you can create a stored procedure and call it from an event. Example: delimiter $$ create

Row to column transformation in MySQL

假装没事ソ 提交于 2019-12-01 11:09:15
I have this result set in MySQL : ID Type Email Degignation 1000000000 202 brijesh@abc.com Entrepreneur 1000000000 234 brijesh@abc.com Engineering,Development 1000000000 239 brijesh@abc.com CTO I have many such tuples not only three . I want Type to be column and last column to become row value for them . Like below ID 202 234 239 Email 1000000000 Entrepreneur Engineering,Development CTO brijesh@abc.com This is called a pivot table. It's kind of awkward to produce: SELECT ID, MAX(CASE Type WHEN 202 THEN Degignation END) AS `202` MAX(CASE Type WHEN 234 THEN Degignation END) AS `234` MAX(CASE

MySQL 8.0.11 error connecting due to caching_sha2_password

自闭症网瘾萝莉.ら 提交于 2019-12-01 09:17:39
When I try to connect to server on MySQL Workbench, I get the error saying Your connection attempt failed to user 'root' from your host to server as localhost:3306: Authentication plugin caching_sha2_password cannot be loaded: The specified module could not be found. It seems like I do not have the module for caching_sha2_password installed. How do I install this plugin? I tried to follow steps provided here . But this is my first interaction with MySQL, so I did not understand the steps. For example, under Using SHA-2 Pluggable Authentication, it says "storing those values in the plugin and