Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2316  / 3 Years ago, wed, october 6, 2021, 1:23:45

I have need to connect to mySql server 5.5 and create database using command line. Ideally it would be using a UI utility but I don't have it. Here is an issue:



alex@ubuntu:~$ sudo mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


However I definitely set password while I was installing MySql server.



What should I do to solve it?


More From » mysql

 Answers
6

Connect with sudo mysql -u root -p and it will prompt you for the password. The key here is the -p option. You can also provide the password as part of the command with the -p option, but that is considered a security risk, since the password will be stored in clear text in your commands history.


[#36499] Friday, October 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
terose questions
;