Score:0

Password for mysql server

cn flag

As I installed mysql the first time no password where given.Then I messed with the mysql shell and might have accidently set a password. So I couldn't remember it when I tried to use the server. Then I reinstalled the package but somehow it was still set and now I get these errors:

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

and

 sudo mysql_secure_installation 
    
    Securing the MySQL server deployment.
    
    Enter password for user root: 
    Error: Access denied for user 'root'@'localhost' (using password: NO)
cn flag
does `sudo -i && mysql` work?
Tom Riddle avatar
cn flag
No it doesnt work still ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
in flag
The `root` MySQL account should only be used when first setting up the server, or when fixing something that has gone really, really wrong. If you’ve set/changed the password and cannot remember it, the you’ll need to wipe the DB server off the machine, clearing remaining directories, and start again. If you need an admin account, create one that isn’t `root` but has the same permissions
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.