Меню

Ошибка 08s01 bad handshake

I’m having problem to connect to the remote DB from the terminal as follow

mysql -u db_user -p -h 10.100.1.100
Enter password:

afer entering password I’m getting that error:

ERROR 1043 (08S01): Bad handshake

and I can connect to the DB from a PC using MySQL Workbench.

Running MySQL Ver 14.14 Distrib 5.1.73 for CentOS6

RolandoMySQLDBA's user avatar

asked Jun 28, 2019 at 20:21

JackTheKnife's user avatar

There is old Bug Report about MySQL Workbench connecting to older databases.

  • Bug #91828 : Bad handshake since 8.0.12

Others have come across this

  • Can’t connect to MySQL server on MySQLCC ERROR 1043 Bad Handshake
  • SOLVED: Bad Handshake – MySQL Workbench Failed To Connect To SQL
  • Devart Forums : Bad Handshake

When you google the subject of «mysql bad handshake», you will see two basic issues:

  • Older Versions of MySQL
  • Older Versions of ODBC/JDBC Drivers

The second post I referred to actually recommends «dummying down» and using an older product (MySQL Administrator for you Old School DBAs like myself).

Main thing to do is to make sure your drivers match the version of Workbench you are using. BTW Don’t feel bad about using MySQL 5.1. There are still a lot of die-hards out there that are using (I hope you sitting down), MySQL 3.23.58.

WHAT TO DO

Use Older Versions of MySQL Workbench, Navicat, SquirrelSQL.

Hey, that worked in the second post (Click Here for Those Tools)

Please remember that MySQL 5.1 made allowances for MySQL 4.1 password authentication. Newer ODBC/JDBC drivers may not understand MySQL 5.1’s way of authenticating and other network-related things, colloquially called «BAD HANDSHAKE».

Community's user avatar

answered Jun 28, 2019 at 22:42

RolandoMySQLDBA's user avatar

RolandoMySQLDBARolandoMySQLDBA

177k32 gold badges307 silver badges505 bronze badges

We recently upgraded from MySQL 5.1.41 to 5.1.61 on our Ubuntu 10.04LTS server. We have an ancient RoR web app that’s now giving a bad handshake error:

Mysql::Error in MainController#index

#08S01Bad handshake

/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:523:in `read'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:153:in `real_connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:389:in `connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:152:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:82:in `new'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:82:in `mysql_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache='
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection='
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:763:in `columns'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:2060:in `attributes_from_column_definition_without_lock'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/locking/optimistic.rb:45:in `attributes_from_column_definition'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1502:in `initialize_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/callbacks.rb:225:in `initialize'
#{RAILS_ROOT}/app/controllers/application.rb:48:in `new'
#{RAILS_ROOT}/app/controllers/application.rb:48:in `log_info'
/usr/local/bin/mongrel_rails:19:in `load'
/usr/local/bin/mongrel_rails:19

I googled around and stumbled onto http://bugs.ruby-lang.org/issues/5017 which tells me it’s a Ruby MySQL extension bug. We aren’t using the MySQL gem. Our web app is incredibly old and fragile (Ruby v1.8.7, Rails v1.2.3, Mongrel 1.1.5). We’re in the process of replacing it with a Django rewrite, so we just need to get this functional for the next few weeks until we will replace it with the new site.

How can we get past this error? I’m thinking that downgrading to MySQL 5.1.41 is the best way to handle this, and then when we begin using the new site in a few weeks, we can re-upgrade to 5.1.61. However, I’m having an issue downgrading mysql. This is the command I’m using:

sudo aptitude install mysql-server-5.1=5.1.41-3ubuntu12.10

However, this tells me Unable to find a version "5.1.41-3ubuntu12.10" for the package "mysql-server-5.1". I’ve tried sudo aptitude install mysql-server-5.1=5.1.41 also, but that didn’t work either. How can I have aptitude install the correct version of MySQL?

I’m having problem to connect to the remote DB from the terminal as follow

mysql -u db_user -p -h 10.100.1.100
Enter password:

afer entering password I’m getting that error:

ERROR 1043 (08S01): Bad handshake

and I can connect to the DB from a PC using MySQL Workbench.

Running MySQL Ver 14.14 Distrib 5.1.73 for CentOS6

Rick James's user avatar

asked Jun 28, 2019 at 19:54

JackTheKnife's user avatar

6

Is connector are compatible with your version? (if you upgraded db recently this may be case) Or Possibly bug try with upgraded version on both db and connector. I can see some similar bugs on mysql portals. Bad handshake most of the time mean both master and clients are not compatible.

answered Jun 29, 2019 at 4:58

asktyagi's user avatar

asktyagiasktyagi

2,5711 gold badge5 silver badges22 bronze badges

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка 08p canon g3411
  • Ошибка 08p canon g2415