3

I am trying to get started with the following github package: py-gameday.

I installed mysql with brew mysql and created a root password:

> mysqladmin -u root password 'xxx'

I then created a user:

> mysql -uroot -p 
Enter password: xxx
CREATE USER 'josh'@'localhost' IDENTIFIED BY 'yyy';

and just in case, I reset the password again:

SET PASSWORD FOR 'josh'@'localhost' = PASSWORD('yyy');

and grant permissions:

GRANT ALL ON gameday.* TO 'josh'@'localhost';

and I then updated mydb.ini with:

[db]
user=josh
password=yyy
db=gameday

I finally tried running the following:

$ mysql -D gameday < gameday.sql -p
Enter password: yyy
ERROR 1049 (42000): Unknown database 'gameday'

Why doesn't it work? I have a gameday.sql sitting there on the directory.

1 Answer 1

4

You need to physically create the database in mysql. Currently the gameday.sql is just a set of commands to run in the mysql database which probably creates a bunch of tables.

You'll need to use CREATE DATABASE gameday; in mysql, then give josh permissions to write to that database. Then the mysql -D -p gameday < gameday.sql -p command should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.