-1

I am new to MySQL. My issue is, is that after typing mysql -proot in the terminal I am receiving this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I don't know what i am doing wrong. I did create a password. However I don't really know how to put it in, in combo with this command.

I am using CentOS 6 on my server

  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) or [Database Administrators Stack Exchange](http://dba.stackexchange.com/) would be a better place to ask. – jww Aug 02 '18 at 23:48
  • Please check https://stackoverflow.com/a/51444744/596021 – Huseyin Aug 03 '18 at 15:07

2 Answers2

0

It's a typo on the syntax. You need a space between proot. It should be

mysql -p root

instead of

mysql -proot
Don
  • 554
  • 4
  • 8
0

mysql -proot this command is telling mysql to use root as the password, which I'm assuming is not the password. You need to put a space between the -p switch and the username to be get the interactive password prompt.

mysql -p root
HorusKol
  • 8,375
  • 10
  • 51
  • 92