Mysql Error 1049 How to Solve

Asked

Viewed 2,672 times

0

had just installed mysql in Ubuntu, then restarted my computer, when I tried to log into mysql gave this error.

someone can help me?

root@wladi-Dell-System-Vostro-3450:/# mysql -r root -p 
Enter password: 
ERROR 1049 (42000): Unknown database 'root'
root@wladi-Dell-System-Vostro-3450:/# 
  • What do you want with the -r? Would not be -u root?

  • that’s right. Thanks a lot

1 answer

1

To option -r refers to how certain special characters should be escaped in the client output. In your command, root is being interpreted as the name of the database you want to access. I believe you are wanting to pass the user. If so, use the following command:

mysql -u root

Browser other questions tagged

You are not signed in. Login or sign up in order to post.