M
M
Maks Burkov2017-10-17 00:35:06
MySQL
Maks Burkov, 2017-10-17 00:35:06

Changing the root password, how to change it correctly?

1. Stopped on the way to /usr/local/mysql/bin
2. Found mysqld_safe
3. Launched

sudo mysqld_safe --init-file=/Desktop/mysqlinit.sql

- mysqlinit.sql ->
UPDATE mysql.user SET Password = PASSWORD('***') WHERE User = 'root';
FLUSH PRIVILEGES;
Then I get -> Command not found!
I am using Mac Sierra 10.12.6. Why can't it find the command?
echo $PATH ->
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS

It is also not clear, after installing mysql on a poppy, I see in the folder along the path -> /usr/local:
1.mysql
2.mysql-5.7.20-macos10.12-x86_64
Can someone explain to me why this is and why this is? To check, I went into these folders and got the same folder structure and names .. It
just doesn’t work through the terminal, maybe it’s Apple’s bugs, what could be the matter?
Neither mysqld , mysql , mysqld_safe work!!
mysqld_safe is in /usr/local/mysql/bin ..
mysqld_safe is in /usr/local/mysql-5.7.20-macos10.12-x86_64/bin ..
What could be wrong ? Why are 2 folders identical?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question