Changing the default database for Rails to MySQL -


I am trying to use MySQL as a database for a database for which I have the default database. IML File

development:

  adapter: mysql encoding: utf8 reconnect: wrong database: *** _ development pool: 5 username: Root password: ***** * Host: Localhost   

Exam:

  Adapter: mysql encoding: UTF 8 again Connect to: Incorrect database: *** _ test pool: 5 sub Yogener Name: Root Password: ****** Host: Localhost   

Production:

  Adapter: mysql Encoding: Utf8 reconnect: Incorrect Database: *** _ Production Pool: 5 Username: Root Password: ****** Host: Localhost   

`

But I After trying to create tables from the console, any .sql file is being created, Ruby on Ruby will not be appreciated any help of any knot mixtures. Thank you.

This will not be in your rail directory. You must have MySQL installed on your computer and you have to create a database in mysql.

Install mysql:

To use mysql through the command line:

  $ mysql   

Or if you have a mysql root user:

  $ mysql -u root -p   

and enter your root mysql user password Once you are in mysql:

  mysql> Create database db_name; Mysql & gt; Db_name * Mysql & gt; Provide all authority over TO 'username' @ 'localhost' mysql & gt; Identity of 'password';   

Clearly change db_name , username and password accordingly.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -