Rail is necessary to connecting between Ruby and MySQL Datab

I want to work on Ruby and Rails. And Please tell me that Rail is
necessary to connecting between Ruby and MySQL Database.

Shakeel