Can't run a SQL Script own MySQL Workbench - mysql

I just installed MySQL server and MySQL Workbench on Mac OS Monterey. I am trying to run a .sql file on Workbench, it gives me this error message:"ascii codec can't decode byte 0xe in position 2380: ordinal not in range(128)." Can anyone help?

There is a bug report related to the same error as yours here:-
bug report
But in your case since ordinal is not in range , you should try to covert your SQL file to any other encoding schemes like UTF8 . You can do that using these steps:-
see here
After this try to open the script in MySql Workbench , issue must be resolved .

Related

MySQL for excel : Connection Attempt Failed. Getting this error in MS Excel

The error Message that I get when I double click my connection under local connections
I downloaded the MySQL for excel add-in for my excel. But whenever I double click on my connections in excel I get the following error: "Connection attempt failed. The given key was not present in the dictionary ". I tried uninstalling and reinstalling both my Microsoft office and MySQL but I am getting the same error no matter how often I try it. I'm completely new to programming and MySQL, and I am not able to find a solution to the problem that I am facing.
Which version are you currently using?
with 8.0.31 I've received the same error.
I've now installed 8.0.20 and now it's working.
Check my response from this Post for details.

MySQL->ODBC->Excel: DataSource.Error: You have an error in your SQL syntax;

I've built a pretty basic database using MySQL Workbench - and I've uploaded a bunch of data. Now I am trying to pull data from my database into MS Excel using an ODBC connection via Excel's Get Data. However, after setting up the ODBC connection, I'm getting the following error for ALL my data fields/columns:
DataSource.Error: ODBC: ERROR [42000] [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.26]You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '.columns_priv' at line 8 Details:
DataSourceKind=Odbc
DataSourcePath=dsn=MySQL Local
OdbcErrors=[Table]
I've searched all over for ideas - I've even tried adding text: SET sql_mode='ANSI_QUOTES' into the Initial Statement field in the Details option in the ODBC connector, as I thought it could be quotes related?
My versions:
MySQL Workbench 8.0.26,
MySQL Connector/ODBC 8.0.26,
MS Excel 2019
Can anyone see where I'm going wrong, or how I can fix this?
Any help would be most appreciated. Thanks,
Stevie
i tested it with my mysql 8.0.26
i used
MySQL ODBC UNICODE driver
My Server is configured to run in legacy mode on local host, but when youz can conect via Workbench, you can use tcpip and localhost
The steps are
Connecting Excel to MySQL with Data Connection Wizard (Legacy Wizard)
Start a new worksheet
Go to the Data tab.
Click From Other Sources, and then click From Data Connection Wizard.
In the opened dialog, you select ODBC DSN and click Next to continue.
Now select a data source you want to connect to, and click Next.
To connect to the table containing the wanted data, select its name and click Next to enter and save information about your new file or click Finish.
In the Import data dialog, you can select the way your data will be viewed in Excel and the place where to put it in the worksheet, and click OK.
The selected data are displayed in the prior empty Excel worksheet.
Good morning.
Have the same issue since updating mysql and mysql odbc to 8.0.26.
mysqld on centos and odbc on windows 10.
Working fine on 8.0.25
Thinking on rollback.
You all have a nice day
I got the same problem. I changed ODBC 8.0 Unicode Driver to 5.3 version. Problem solved.
Same issue.
According to the error log, the odbc adds a nonsense pair of backquotes between the database name and table name in the "select ... from ..." sql.
Downgrade my mysql odbc version to 8.0.25.
Problem solved.

Why is there an error with the source command in MySQL

I'm trying to add the employee sample database for practicing with MySQL however there's an error since there's a source command and from what I've found it says that MySQL doesn't support this command anymore.
So, how could I add the complete database without any error?
[this is the code line where the source command is called]
SOURCE is one of the mysql client builtin commands. These are recognized by the mysql client, but not by the MySQL Server's SQL parser.
See https://dev.mysql.com/doc/refman/8.0/en/mysql-commands.html

Type not supported - The JSON data is not available before MySQL 5.7.8

I am running local MySQL instance version of 5.7.23 in Ubuntu-18-04. The DB is already having some tables having JSON fields to store JSON data. They working fine with insert, update and delete operations.
The issue comes when try to modify an existing table to have a new field to store JSON data. MySQL-Workbench is giving an error saying
Type not supported
The JSON data is not available before MySQL 5.7.8.
In order to use it, first set the version for your model to 5.7.8 or
higher
Following screen shots shows my local environment information.
The error:
MySQL server info:
MySQL Workbench info:
I was able to figure the issue. The default version set for Modeling MySQL was set as 5.6.30. Changed it to 5.7.8 and works the table schema modification.
Go to Edit -> Preferences... in MySQL Workbench
Refer the below screens:
Before:
After:
Preference doesn't work for me. I use osx with workbench version 8.0.11.
Model in top bar menu -> Model Options -> MySQL then change the version as Shantha's answer works for me.
Previous version of MySQLWorkbench (6.3.10) has better error message for this...

Trying to migrate SQL Server to MySQL using MySQL Workbench. Error: "[Microsoft][ODBC Driver Manager] Invalid argument value" when migrating data

Long time lurker, first time poster; hoping anyone can help me out.
Im using MySQL Workbench 5.2.41 to migrate a database from SQL Server to MySQL 5.0.8
The entire process goes smoothly: both SQL and MySQL connection Tests are good, the skemea and table create as expected, everything checks out until the 'Bulk Data Transfer' step. At that point I receive this error:
...
Migrating data...
wbcopytables.exe --odbc-source=DSN=SQL Server 11;DATABASE=;UID=sa --target=root#127.0.0.1:3306 --progress --passwords-from-stdin --thread-count=1 --table [GSAClosers_v2] [dbo].[AccountBase] `dbo` `AccountBase`
`dbo`.`AccountBase`:Copying 84 columns of 169530 rows from table [GSAClosers_v2].[dbo].[AccountBase]
ERROR: `dbo`.`AccountBase`:SQLGetData: HY009:10:[Microsoft][ODBC Driver Manager] Invalid argument value `dbo`.`AccountBase`:
Finished copying 0 rows in 0m00s
Copy helper has finished
...
For connectors I'm using Microsoft SQL Server / ODBC Data Source / DSN: SQL Server and for MySQL the IP and port(3306).
SQL Server 2012 Management Studio connects and all operations work as expected.
O, side not: both are on the same localhost machine.
If anyone can shed some light on this I would be forever indebted. Thanks in advance
From here:
[Microsoft][ODBC Driver Manager] Invalid argument value.
Regarding to the error message and code you provided, which seems is
database is invalid or cannot be accessed. That means either the
database does not exist or the user does not have permission to access
the database.
It turns out you need specify the instance after the server name, so
in the server name in the dialog box for creating the ODBC Data
Source, you must enter it as either: MyServer\SQLEXPRESS or
.\SQLEXPRESS
I think you may have a problem connecting to your database from wbcopytables.exe. Keep in mind that this is a separate tool so the fact that you can connect from the rest of the Migration Wizard doesn't imply that you will connect in wbcopytables.exe.
The thing that worries me the most is that your DSN has whitespace characters. This might be interpreted by the Windows terminal as independent command line parameters. One thing you can do is to edit your DSN name removing the whitespaces and try again.
You may also want to connect without a DSN by putting all your connection parameters explicitely as explained in my blog post: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.
And, by the way, since MySQL Workbench 5.2.42 is out you should go and get it. The Migration Wizard is pretty new so important bug fixes are likely launched in each recent Workbench release.
In either case I think you should file a bug with your issues with a detailed explanation about how to reproduce it, possible solutions, etc.
Hope this helps.
Ok, got it figured out: un-install java. install java 1.6, use MySQL Migration Tool. change all data types to varchar, ints and bits. run migrations....eat data.