mysql gives me this >- then stops working

0

Just want to go ahead and apologize for any misuses of terminology or lack of knowledge. I am a business education major and this database course got substituted for a web design course so I am completely new to this. I will explain my problem as best as I can.

I am running MySQL through XAMPP. I am using -u root (professor said no passwords are necessary so this is why). My problem has occurred twice and I need it to stop! Basically, I am just creating my database, all is well, then I enter a line of code required for my assignment, I press enter, then all of a sudden I am on a new line with no error message just this symbol >-

The first time this happened, I closed the command prompt and XAMPP. I reopened it and I had about 3 databases that were originally on there MISSING, PLUS the one I was working on. I could view the databases I had, but was basically told I did not have the permissions to create any databases. The link below shows what it looks like. I am left with only these 2 databases.

https://i.stack.imgur.com/vhHFI.png

I completely uninstalled and reinstalled the program and all was well. I was on my way and almost done with my assignment when it happened AGAIN! Same little symbol, at this point it would even let me 'exit' MySQL. I had already checked to see if my database was showing up and it was. NOW, it wasn't along with the same other three databases that were automatically on there when I opened the program. Please someone tell me why is this happening!

bkagodwin

Posted 2017-06-30T03:19:43.497

Reputation: 1

That symbol means that you missing some part of the command, the command is incomplete. To get permission to create a new database use mysql -u root -p to login as a root – Genaro Morales – 2017-06-30T03:30:14.747

okay great! Is there anyway to retrieve my databases? They are completely gone! And there were three on there that were just automatically included in the program and are gone now. Thank you for your help! @GenaroMorales – bkagodwin – 2017-06-30T03:43:11.907

this is mysql client, you need to run in bash (since you're using the root). to run the bash, type mysql -u root -p. from there you can work without issue – iSR5 – 2017-06-30T03:43:29.903

@bkagodwin if you're not able to see your tables, use information_schema to check if there are already there or not : https://dev.mysql.com/doc/refman/5.7/en/information-schema.html

– iSR5 – 2017-06-30T03:49:28.813

Okay, so I ran mysql -u root -p, was prompted for a password, don't know it and don't know how to change it. BUT, ran MySQL -u root again, and all of my databases were there! I just want to understand what is causing that? Thanks again for all of your help and understanding! – bkagodwin – 2017-06-30T03:53:52.423

if you haven't set any password for the root, just leave the password field blank. If there is an actual password, you need to reset the password. https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

– iSR5 – 2017-06-30T04:09:50.587

No answers