WEISFall2016 / MySQL-Labs

0 stars 0 forks source link

LAB2A - Getting into database mysql on Windows #2

Open KathlynS opened 7 years ago

KathlynS commented 7 years ago

"-u root mysql " doesn't work in Windows. Instead, I issued the tee command, and then switched databases by issuing "USE mysql;"

sammitchell410 commented 7 years ago

Hi Kathlyn,

Can you explain exactly what doesn't work here?

For instance, when I log into MySQL in the terminal, I must first go to the mysql directory or create an alias for the directory and label it "mysql". This may look like (without the alias) /usr/local/mysql/bin/mysql.

Next, I log into mysql either as "root" or as "student": "mysql -u root -p" which will then prompt me for a password and then log me into mysql but not into a specific database because I did not specify one. I would then absolutely use the "USE mysql" command to get into this database. If I wanted to log into the "mysql" database as you specify above, I can say "mysql -u root -p mysql" which will take me directly into the mysql database. For me, since I have already specified a password, "-u root mysql" will not work because I did not prompt it for a password request.

What is your use of the "tee" command? It is just there so we can keep track of everything we do in the terminal.

Sam

KathlynS commented 7 years ago

Hi Sam,

I'm sorry, I didn't mean to post this as a question. I meant to post it as an update to what needs to be done differently on windows than the instructions show for mac.

The very first set of instructions don't work on windows. So, I had to log in as root, and then switch databases using USE mysql. As far as the tee command, I was just pointing out that I chose to start teeing before this command instead of after.

Kathy