Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#4: Post edited by user avatar Canina‭ · 2021-08-31T09:07:56Z (about 3 years ago)
formatting, tags
How to solve Lost connection to MySQL server at 'reading initial communication packet', system error: 0
  • ![image](https://collab.codidact.org/uploads/H3C5Xdr7W1D5KAwp3P48MobZ)
  • after
  • `rails db:create`
  • ![Image alt text](https://collab.codidact.org/uploads/iZXDFk7j9FcLiveRmGuukTTP)
  • Lost connection to MySQL server at 'reading initial communication packet', syste m error: 0
  • Couldn't create 'qpixel_dev' database. Please check your configuration.
  • rails aborted!
  • Mysql2::Error::ConnectionError: Lost connection to MySQL server at 'reading init ial communication packet', system error: 0
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `con nect'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `ini tialize'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `new'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:830:in `new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:538:in `checkout'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:382:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:118:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:90:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:6:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:14:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:119:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:139:in `block in create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:316:in `block in each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:138:in `create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/railtie s/databases.rake:29:in `block (2 levels) in <top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:23:in `block in perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:20:in `perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/command.rb:48:in `i nvoke'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands.rb:18:in ` <top (required)>'
  • /root/qpixel/bin/rails:9:in `require'
  • /root/qpixel/bin/rails:9:in `<top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `load'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/command.rb:7: in `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client.rb:30:in `run '
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/bin/spring:49:in `<top (require d)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `lo ad'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<t op (required)>'
  • /root/qpixel/bin/spring:13:in `require'
  • /root/qpixel/bin/spring:13:in `<top (required)>'
  • bin/rails:3:in `load'
  • bin/rails:3:in `<main>'
  • ![screenshot of text](https://collab.codidact.org/uploads/H3C5Xdr7W1D5KAwp3P48MobZ)
  • after
  • `rails db:create`
  • ![screenshot of text](https://collab.codidact.org/uploads/iZXDFk7j9FcLiveRmGuukTTP)
  • ```
  • Lost connection to MySQL server at 'reading initial communication packet', syste m error: 0
  • Couldn't create 'qpixel_dev' database. Please check your configuration.
  • rails aborted!
  • Mysql2::Error::ConnectionError: Lost connection to MySQL server at 'reading init ial communication packet', system error: 0
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `con nect'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `ini tialize'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `new'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:830:in `new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:538:in `checkout'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:382:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:118:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:90:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:6:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:14:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:119:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:139:in `block in create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:316:in `block in each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:138:in `create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/railtie s/databases.rake:29:in `block (2 levels) in <top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:23:in `block in perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:20:in `perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/command.rb:48:in `i nvoke'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands.rb:18:in ` <top (required)>'
  • /root/qpixel/bin/rails:9:in `require'
  • /root/qpixel/bin/rails:9:in `<top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `load'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/command.rb:7: in `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client.rb:30:in `run '
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/bin/spring:49:in `<top (require d)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `lo ad'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<t op (required)>'
  • /root/qpixel/bin/spring:13:in `require'
  • /root/qpixel/bin/spring:13:in `<top (required)>'
  • bin/rails:3:in `load'
  • bin/rails:3:in `<main>'
  • ```
#3: Post edited by user avatar Gate_sprit‭ · 2021-08-31T08:00:57Z (about 3 years ago)
  • ![image](https://collab.codidact.org/uploads/H3C5Xdr7W1D5KAwp3P48MobZ)
  • after
  • `rails db:create`
  • ![Image alt text](https://collab.codidact.org/uploads/iZXDFk7j9FcLiveRmGuukTTP)
  • Lost connection to MySQL server at 'reading initial communication packet', syste m error: 0
  • Couldn't create 'qpixel_dev' database. Please check your configuration.
  • rails aborted!
  • Mysql2::Error::ConnectionError: Lost connection to MySQL server at 'reading init ial communication packet', system error: 0
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `con nect'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `ini tialize'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `new'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:830:in `new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:538:in `checkout'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:382:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:118:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:90:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:6:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:14:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:119:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:139:in `block in create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:316:in `block in each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:138:in `create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/railtie s/databases.rake:29:in `block (2 levels) in <top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:23:in `block in perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:20:in `perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/command.rb:48:in `i nvoke'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands.rb:18:in ` <top (required)>'
  • /root/qpixel/bin/rails:9:in `require'
  • /root/qpixel/bin/rails:9:in `<top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `load'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/command.rb:7: in `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client.rb:30:in `run '
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/bin/spring:49:in `<top (require d)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `lo ad'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<t op (required)>'
  • /root/qpixel/bin/spring:13:in `require'
  • /root/qpixel/bin/spring:13:in `<top (required)>'
  • bin/rails:3:in `load'
  • bin/rails:3:in `<main>'
  • ![test](https://collab.codidact.org/uploads/VS3WDa2schb8QfdUWJz3Lm92)
  • ![image](https://collab.codidact.org/uploads/H3C5Xdr7W1D5KAwp3P48MobZ)
  • after
  • `rails db:create`
  • ![Image alt text](https://collab.codidact.org/uploads/iZXDFk7j9FcLiveRmGuukTTP)
  • Lost connection to MySQL server at 'reading initial communication packet', syste m error: 0
  • Couldn't create 'qpixel_dev' database. Please check your configuration.
  • rails aborted!
  • Mysql2::Error::ConnectionError: Lost connection to MySQL server at 'reading init ial communication packet', system error: 0
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `con nect'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `ini tialize'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `new'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:830:in `new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:538:in `checkout'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:382:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:118:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:90:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:6:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:14:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:119:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:139:in `block in create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:316:in `block in each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:138:in `create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/railtie s/databases.rake:29:in `block (2 levels) in <top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:23:in `block in perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:20:in `perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/command.rb:48:in `i nvoke'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands.rb:18:in ` <top (required)>'
  • /root/qpixel/bin/rails:9:in `require'
  • /root/qpixel/bin/rails:9:in `<top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `load'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/command.rb:7: in `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client.rb:30:in `run '
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/bin/spring:49:in `<top (require d)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `lo ad'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<t op (required)>'
  • /root/qpixel/bin/spring:13:in `require'
  • /root/qpixel/bin/spring:13:in `<top (required)>'
  • bin/rails:3:in `load'
  • bin/rails:3:in `<main>'
#2: Post edited by user avatar Gate_sprit‭ · 2021-08-31T07:41:12Z (about 3 years ago)
  • after rails db:create
  • ![alt](https://collab.codidact.org/uploads/QYBRDXBvnzv7VM74BFGeutht)
  • ![image](https://collab.codidact.org/uploads/H3C5Xdr7W1D5KAwp3P48MobZ)
  • after
  • `rails db:create`
  • ![Image alt text](https://collab.codidact.org/uploads/iZXDFk7j9FcLiveRmGuukTTP)
  • Lost connection to MySQL server at 'reading initial communication packet', syste m error: 0
  • Couldn't create 'qpixel_dev' database. Please check your configuration.
  • rails aborted!
  • Mysql2::Error::ConnectionError: Lost connection to MySQL server at 'reading init ial communication packet', system error: 0
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `con nect'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `ini tialize'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `new'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:830:in `new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:538:in `checkout'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:382:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:118:in `retrieve_connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/connect ion_handling.rb:90:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:6:in `connection'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/m ysql_database_tasks.rb:14:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:119:in `create'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:139:in `block in create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:316:in `block in each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:313:in `each_current_configuration'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/tasks/d atabase_tasks.rb:138:in `create_current'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/activerecord-5.2.6/lib/active_record/railtie s/databases.rake:29:in `block (2 levels) in <top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:23:in `block in perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands/rake/rake_ command.rb:20:in `perform'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/command.rb:48:in `i nvoke'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/railties-5.2.6/lib/rails/commands.rb:18:in ` <top (required)>'
  • /root/qpixel/bin/rails:9:in `require'
  • /root/qpixel/bin/rails:9:in `<top (required)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `load'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/rails.rb:28:i n `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client/command.rb:7: in `call'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/client.rb:30:in `run '
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/bin/spring:49:in `<top (require d)>'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `lo ad'
  • /usr/share/rvm/gems/ruby-2.6.6/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<t op (required)>'
  • /root/qpixel/bin/spring:13:in `require'
  • /root/qpixel/bin/spring:13:in `<top (required)>'
  • bin/rails:3:in `load'
  • bin/rails:3:in `<main>'
  • ![test](https://collab.codidact.org/uploads/VS3WDa2schb8QfdUWJz3Lm92)
#1: Initial revision by user avatar Gate_sprit‭ · 2021-08-31T07:38:16Z (about 3 years ago)
How to solve Lost connection to MySQL server at 'reading initial communication packet', system error: 0
after rails db:create
![alt](https://collab.codidact.org/uploads/QYBRDXBvnzv7VM74BFGeutht)