To create a simple RoR app connected to a MySQL database. When I get
to the point where I have to run "rake db:create" I get the error
"Protocol error - db:migrate". E.g:
I have no idea what this means and can find no information after
extensive googling. I'll provide as much info about my environment/
setup as I know how to provide...
Any help or suggestions as to how I can figure this out? Please......
Have you created the library_development, library_test, and
library_production databases? These need to be in place in mysql
prior to any db:migrate calls.
This should be fine. You don't need to specify the socket. Are you
connecting on a particular port? If you are, you need to specify the
port if it's different than the normal 3306 I believe for mysql...
I'm actually just trying to get db:create to work first (although I
did try db:migrate to no avail). Surely db:create should work with
just "development" defined in the yml and existing in MySQL ???
I will try creating and defining all three, just to be sure...
I'm actually just trying to get db:create to work first (although I
did try db:migrate to no avail). Surely db:create should work with
just "development" defined in the yml and existing in MySQL ???
I will try creating and defining all three, just to be sure...
Yep, db:create works for development only while db:create:all works with
all specified environments listed in your database.yml file.
You don't need the socket and you don't need the root@ubi line either...
That's a good thing - means your gem for mysql is fine. I would try a
few other things - it really sounds like it's on the server side of
mysql..
What version of mysql are you running?
I would create the library_development DB from scratch and try to
migrate your beginning data using db:migrate. You will find out right
away if there is a communication error. It could be that there's an
authentication error or a trouble with communication to the server.
I've seen this exact error when I tried to use the newest version of
mysql and so I had to go back to an older version. If this gives you a
lot of issues, you could try going to sqlite3 or postgresql..