Change mysql root password on linux!

Asked

Viewed 307 times

0

Good afternoon Personal!

I’m new to the world of development and I’m new to linux. I installed the mysql client and server and then installed mysql-workbanch via Xubuntu program center. At no time he asked me to configure the password and I can’t connect because I don’t know the root password. I tried default passwords and tried not "by" empty password, it accuses access denied. I searched for tutorials on the internet, I will put an example here where I followed the steps, "https://www.secnet.com.br/blog/alterar-senha-root-mysql-server", and my terminal presents me with the following error at the time of the following command "# mysqld --Skip-Grant-Tables &":

ERROR 2002 (HY000): Can’t connect to local Mysql server through socket '/var/run/mysqld/mysqld.Sock' (2)

i don’t know how to do, I’ve tried several tutorials but I’m unable to access. Please can help me?

  • what distribution do you use for linux? what default passwords did you try? tried root, Toor, leave the field empty?

  • This error placed in the post has nothing to do with password, simply was not located instance of DB running with the same client config. It would be important for you to [Dit] the post, and describe the problem more accurately. If the linked post above does not resolve, add the details as suggested, that if the problem is really different and within the scope of the site, the question can be reopened.

  • Friend, the best way is always to consult the documentation. Mysql has a tool that can change the root password (among other features). It is mysql_secure_instalation. You have to run root (sudo). https://dev.mysql.com/doc/refman/5.7/en/mysql-secure-installation.html

No answers

Browser other questions tagged

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