Having trouble connecting to old version mysql(4.0) with python3 - mysql

I got an error "ERROR 2013 (HY000): Lost connection to MySQL server during query" when I tried to use the following python3 code to connect to MySQL database.
mysql.connector.connect(user, password, host, database)
Since my MySQL version is 4.0 and I found a document says that it doesn't support versions prior to 4.1.
https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html
I can't change MySQL version of my device, is it possible to connect to MySQL 4.0 with python 3?

Related

Failure to connect to MySQL server from SQL Server Migration Assistant

I have SQL Server 2017 Developer installed. I want to use the SQL Server Migration Assistant for MySQL to migrate a MySQL database into SQL Server. But I can't get the migration assistant to connect to the MySQL server. First of all, using MySQL Workbench I can connect to the server with no problem through this dialog box;
MySQL Workbench connection dialog box
Using the same service, (or server) name, port and user entered into the migration assistant dialog box for connecting to the MySQL server;
SQL Server Migration Assistant connection to MySQL Server dialog box
I get an error message saying,
Cconnection to MySQL failed. ERROR [HY000] [MySQL][ODBC 5.2(w) Driver]Unknown MySQL server host 'Mysql#127.0.0.1' (0)
I've tried selecting both the ANSI and unicode ODBC drivers, version 5.2 and 5.3. Nothing seems to work.
You need to remove "Mysql#" from the connection string. This isn't a necessary part of the hostname when connecting through SSMA.

MySQL Workbench: 'Use the old authentication protocol.' option causes error

When I try to connect to an old MySQL database using MySQL Workbench using the Use the old authentication protocol option under the Advanced tab, MySQL Workbench returns this error:
You have an error in your SQL syntax near 'SESSION VARIABLES LIKE 'lower_case_tables_name' at line 1
Workbench v6.1.7
MySQL server v3.23.41 on RedHat
Database and Tables
are lowercase and uppercase (camelCase).
How can I fix this error?
I had to look this up, as I do not have any 3.x any more:
The GLOBAL and SESSION modifiers are new in MySQL 4.0.3.
I also got this:
Oracle MySQL Workbench does not support MySQL Server versions 4.x.
Your best option is stick to the mysql command line client (or update MySQL Server, as 3.23.41 was released on 11 August 2001).

Error Trying to Connect R to MySQL using RODBC

I am attempting to connect R to a MySQL database via RODBC (in Win 7 environment), but cannot get past the following error:
[RODBC] ERROR: state IM014, code 0, message [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
After entering the following command:
odbcConnect(dsn,uid="My_UID",pwd="My_PWD")
I have successfully created a driver for the database by following the odbc wizard, and have installed the RODBC package into RStudio (ver 0.98.490). The MySQL is running on 32bit, I have the 32bit driver installed and working, and my RStudio is also 32bit. I know that the driver is working since both the test connection in config. works, as do queries run on excel using the driver.
What can I do to get the connection to work in R?
(Previous responses to this question seem to have been removed.)
Thanks in advance!
I faced a similar RODBC connectivity issue using DSN, where R was crashing abruptly without any logs/error trace. I tried with DSN-less ODBC connection API, it works fine.
odbcDriverConnect("SERVERNAME=;DRIVER={};DATABASE=;UID=;PWD=;")
Steps:
1. Install ODBC driver
2. Define VNode (host, listen address, protocol)
3. Use the odbcDriverConnect API
Docs:
http://cran.r-project.org/web/packages/RODBC/RODBC.pdf
http://cran.r-project.org/web/packages/RODBC/vignettes/RODBC.pdf
Hope this helps.

error number 2003 while re-installing MySQL server instance configuration 5.5

I unistalled mysql 5.5 from my system. Now when i am re-installing it is giving me following error:
The security settings could not be applied.
Error number 2003
can't connect to localhost 10061.
In the description of this error it is mentioned that if you are re-installing mysql then you must provide your old password, so, when i enter the old password(as i remember) in the mysql command line which get installed after above error,window get closed with a beep sound showing some error.
Please suggest what should i do?

LINQPad + IQ Driver for MySQL Connection Error: Bad handshake

I can't connect to my local MySQL Server with Linqpad + IQ Driver. I constantly get the following error:
Connection Error: Bad handshake
The MySQL Service is up and running. I can connect with command line client.
MySQL Version: 5.5.15
LINQPad Version: 4.31
IQ Driver Version: 2.0.2.0
I tried out almost all possible (really!!!) different configurations and MySQL packages. The newest release that works is MySQL Server 5.1.56
I didn't find that particular release on mysql.com. But you can get it from here: http://olex.openlogic.com/packages/mysql/5.1.56