Tutorial setting eviroment rvm, ruby, ruby on rails, mysql, connect with mysql workbench trong ubuntu | Trần Hữu Thắng

INSTALL RVM Step 1: sudo apt-get update Step 2: sudo apt install gnupg2 Step 3: sudo apt install curl Step 4: curl -sSL https://rvm.io/mpapis.asc | gpg --import - Step 5: curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - Step 6: curl -sSL https://get.rvm.io | bash -s stable && source ~/.bashrc Step 7: rvm --version INSTALL RUBY

INSTALL RVM

  • Step 1: sudo apt-get update
  • Step 2: sudo apt install gnupg2
  • Step 3: sudo apt install curl
  • Step 4: curl -sSL https://rvm.io/mpapis.asc | gpg --import -
  • Step 5: curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
  • Step 6: curl -sSL https://get.rvm.io | bash -s stable && source ~/.bashrc
  • Step 7: rvm --version

INSTALL RUBY

  • Step 8: rvm install ruby
  • Step 9: rvm install 2.7.2
  • Step 10: sudo apt install ruby && check ruby --version

INSTALL RAILS

  • Step 11: sudo apt install ruby-railties & check rails -v
  • Step 12: /bin/bash --login && rvm use 2.7.2 --default
  • Step 13: install rails version , i install rails 6.1 gem install rails --version=6.1.4 && rails -v

INSTALL MYSQL

  • Step 14: sudo apt install mysql-server
  • Step 15: sudo mysql_secure_installation
    Come here, you set a password and keep saying yes

  • Step 16: sudo mysql -u root -p
    Press enter ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'welcome123';

  • Step 17: ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'welcome123';
    in case error Your password does not satisfy the current policy requirements
    then enter SHOW VARIABLES LIKE 'validate_password%';

enter 3 line this code

SET GLOBAL validate_password_policy=LOW;
SET GLOBAL validate_password.length = 9; 
SET GLOBAL validate_password.number_count = 0;

If there is no error, continue
This is you set your mysql password, to connect the database

  • Step 19 : sudo mysql -u root -p
    Result

That’s it, just to be sure, try to enter it wrong and see if it gives you this error, Result

DONE !

Install mysql workbench

  • Step 20 :

Result

  • Step 21: connect mysql workbech
    Enter your password mysql

result :

Done 😄

Nguồn: viblo.asia

Bài viết liên quan

SEO Mũ Trắng, Mũ Đen, Mũ Xám: Hiểu Biết và Lựa Chọn Phù Hợp

SEO Mũ Trắng, Mũ Đen, Mũ Xám: Hiểu Biết và Lựa Chọn Phù Hợp Trong kỷ nguyên s

7 Cách Tăng Tốc Ứng Dụng React Hiệu Quả Mà Bạn Có Thể Làm Ngay

React là một thư viện JavaScript phổ biến trong việc xây dựng giao diện người d

Trung Quốc “thả quân bài tẩy”: hàng loạt robot hình người!

MỘT CUỘC CÁCH MẠNG ROBOT ĐANG HÌNH THÀNH Ở TRUNG QUỐC Thượng Hải, ngày 13/5 –

9 Mẹo lập trình Web “ẩn mình” giúp tiết kiệm hàng giờ đồng hồ

Hầu hết các lập trình viên (kể cả những người giỏi) đều tốn thời gian x