Mysql fixing root passwordWhere is my mysql log on OS X?SSH hangs without password promptOpen Directory password expiration warningsssh hangs without password prompt — works in root or other accountsReset MySQL 5 root password on Mac OS XWill setting MySQL root password prevent it from autostarting?Snow Leopard connecting to Unbuntu 10.04 through Samba failure — need help fixingDecrypt Cisco VPN Group passwordMySQL - Access denied for user 'root'@'localhost' (using password: YES)mysqld_safe --skip-grant-tables exits before i can type mysql-u root to rest root password
Gift for mentor after his thesis defense?
shebang or not shebang
What is the meaning of "matter" in physics?
What's the 2-minute timer on mobile Deutsche Bahn tickets?
Concatenate all values of the same XML element using XPath/XQuery
How could a humanoid creature completely form within the span of 24 hours?
GitLab account hacked and repo wiped
Why can’t you see at the start of the Big Bang?
The unknown and unexplained in science fiction
What is more safe for browsing the web: PC or smartphone?
What calendar would the Saturn nation use?
Convert Numbers To Emoji Math
Translation of "invincible independence"
Why is the episode called "The Last of the Starks"?
How can I test a shell script in a "safe environment" to avoid harm to my computer?
Can a player choose to add detail and flavor to their character's spells and abilities?
Are modes in jazz primarily a melody thing?
Can anyone identify this unknown 1988 PC card from The Palantir Corporation?
Is throwing dice a stochastic or a deterministic process?
If quadruped mammals evolve to become bipedal will their breast or nipple change position?
How is it believable that Euron could so easily pull off this ambush?
Why were the rules for Proliferate changed?
Select list elements based on other list
What did Varys actually mean?
Mysql fixing root password
Where is my mysql log on OS X?SSH hangs without password promptOpen Directory password expiration warningsssh hangs without password prompt — works in root or other accountsReset MySQL 5 root password on Mac OS XWill setting MySQL root password prevent it from autostarting?Snow Leopard connecting to Unbuntu 10.04 through Samba failure — need help fixingDecrypt Cisco VPN Group passwordMySQL - Access denied for user 'root'@'localhost' (using password: YES)mysqld_safe --skip-grant-tables exits before i can type mysql-u root to rest root password
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I guess I messed up the user
table trying to update the password running something like
UPDATE mysql.user SET authentication_string='root' WHERE User='root';
without flushing privileges. Now I'm basically locked out and I cannot connect to mysql cli even if I try
sudo mysqld_safe --skip-grant-tables &
There is a way I can safely remove all mysql databases including user
table?
(MacOS mojave)
This is the content of /usr/local/bin
related to mysql
mysql mysqladmin mysqlpump
mysql.server mysqlbinlog mysqlrouter
mysql_client_test mysqlcheck mysqlrouter_plugin_info
mysql_config mysqld mysqlshow
mysql_config_editor mysqld_multi mysqlslap
mysql_secure_installation mysqld_safe mysqltest
mysql_ssl_rsa_setup mysqldump mysqlxtest
mysql_tzinfo_to_sql mysqldumpslow
mysql_upgrade mysqlimport
mac-osx
add a comment |
I guess I messed up the user
table trying to update the password running something like
UPDATE mysql.user SET authentication_string='root' WHERE User='root';
without flushing privileges. Now I'm basically locked out and I cannot connect to mysql cli even if I try
sudo mysqld_safe --skip-grant-tables &
There is a way I can safely remove all mysql databases including user
table?
(MacOS mojave)
This is the content of /usr/local/bin
related to mysql
mysql mysqladmin mysqlpump
mysql.server mysqlbinlog mysqlrouter
mysql_client_test mysqlcheck mysqlrouter_plugin_info
mysql_config mysqld mysqlshow
mysql_config_editor mysqld_multi mysqlslap
mysql_secure_installation mysqld_safe mysqltest
mysql_ssl_rsa_setup mysqldump mysqlxtest
mysql_tzinfo_to_sql mysqldumpslow
mysql_upgrade mysqlimport
mac-osx
add a comment |
I guess I messed up the user
table trying to update the password running something like
UPDATE mysql.user SET authentication_string='root' WHERE User='root';
without flushing privileges. Now I'm basically locked out and I cannot connect to mysql cli even if I try
sudo mysqld_safe --skip-grant-tables &
There is a way I can safely remove all mysql databases including user
table?
(MacOS mojave)
This is the content of /usr/local/bin
related to mysql
mysql mysqladmin mysqlpump
mysql.server mysqlbinlog mysqlrouter
mysql_client_test mysqlcheck mysqlrouter_plugin_info
mysql_config mysqld mysqlshow
mysql_config_editor mysqld_multi mysqlslap
mysql_secure_installation mysqld_safe mysqltest
mysql_ssl_rsa_setup mysqldump mysqlxtest
mysql_tzinfo_to_sql mysqldumpslow
mysql_upgrade mysqlimport
mac-osx
I guess I messed up the user
table trying to update the password running something like
UPDATE mysql.user SET authentication_string='root' WHERE User='root';
without flushing privileges. Now I'm basically locked out and I cannot connect to mysql cli even if I try
sudo mysqld_safe --skip-grant-tables &
There is a way I can safely remove all mysql databases including user
table?
(MacOS mojave)
This is the content of /usr/local/bin
related to mysql
mysql mysqladmin mysqlpump
mysql.server mysqlbinlog mysqlrouter
mysql_client_test mysqlcheck mysqlrouter_plugin_info
mysql_config mysqld mysqlshow
mysql_config_editor mysqld_multi mysqlslap
mysql_secure_installation mysqld_safe mysqltest
mysql_ssl_rsa_setup mysqldump mysqlxtest
mysql_tzinfo_to_sql mysqldumpslow
mysql_upgrade mysqlimport
mac-osx
mac-osx
edited Apr 28 at 17:50
alfredopacino
asked Apr 28 at 17:21
alfredopacinoalfredopacino
123116
123116
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
First backup your /etc/mysql
and /var/lib/mysql
directories.
Then try to initalize
mysql_install_db
to recreate the mysql schema from scratch.
You can read about it here: https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html
I do not have both those dirs. And I getcommand not found
launchingmysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall usingbrew
– alfredopacino
Apr 28 at 17:44
whatwhereis mysql
says?
– Comar
Apr 28 at 17:45
which mysql
prints/usr/local/bin/mysql
(whereis
prints nothing)
– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to uselocate mysql
for this job.
– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in/usr/local/bin
if it helps
– alfredopacino
Apr 28 at 17:52
add a comment |
You could simply uninstall mysql and purge configuration files if you don't need the databases or any settings.
The steps would be:
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql ## verify within my.cnf
ps. Take this with a grain of salt, as I'm not a MacOS user.
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing/usr/local/var/mysql
didn't solved..
– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:sudo rm -rf /usr/local/bin/mysql
.
– Leo
Apr 29 at 14:53
add a comment |
I got the problem, basically almost all the solution you can find around are outdated.
With mysql 8.0.15 you have to follow this guide
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Using the method UPDATE mysql.user SET authentication_string..
will lock you out from your own mysql server (you won't solve even with mysqld_safe --skip-grant-tables
).
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964975%2fmysql-fixing-root-password%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
First backup your /etc/mysql
and /var/lib/mysql
directories.
Then try to initalize
mysql_install_db
to recreate the mysql schema from scratch.
You can read about it here: https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html
I do not have both those dirs. And I getcommand not found
launchingmysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall usingbrew
– alfredopacino
Apr 28 at 17:44
whatwhereis mysql
says?
– Comar
Apr 28 at 17:45
which mysql
prints/usr/local/bin/mysql
(whereis
prints nothing)
– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to uselocate mysql
for this job.
– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in/usr/local/bin
if it helps
– alfredopacino
Apr 28 at 17:52
add a comment |
First backup your /etc/mysql
and /var/lib/mysql
directories.
Then try to initalize
mysql_install_db
to recreate the mysql schema from scratch.
You can read about it here: https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html
I do not have both those dirs. And I getcommand not found
launchingmysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall usingbrew
– alfredopacino
Apr 28 at 17:44
whatwhereis mysql
says?
– Comar
Apr 28 at 17:45
which mysql
prints/usr/local/bin/mysql
(whereis
prints nothing)
– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to uselocate mysql
for this job.
– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in/usr/local/bin
if it helps
– alfredopacino
Apr 28 at 17:52
add a comment |
First backup your /etc/mysql
and /var/lib/mysql
directories.
Then try to initalize
mysql_install_db
to recreate the mysql schema from scratch.
You can read about it here: https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html
First backup your /etc/mysql
and /var/lib/mysql
directories.
Then try to initalize
mysql_install_db
to recreate the mysql schema from scratch.
You can read about it here: https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html
answered Apr 28 at 17:40
ComarComar
27116
27116
I do not have both those dirs. And I getcommand not found
launchingmysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall usingbrew
– alfredopacino
Apr 28 at 17:44
whatwhereis mysql
says?
– Comar
Apr 28 at 17:45
which mysql
prints/usr/local/bin/mysql
(whereis
prints nothing)
– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to uselocate mysql
for this job.
– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in/usr/local/bin
if it helps
– alfredopacino
Apr 28 at 17:52
add a comment |
I do not have both those dirs. And I getcommand not found
launchingmysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall usingbrew
– alfredopacino
Apr 28 at 17:44
whatwhereis mysql
says?
– Comar
Apr 28 at 17:45
which mysql
prints/usr/local/bin/mysql
(whereis
prints nothing)
– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to uselocate mysql
for this job.
– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in/usr/local/bin
if it helps
– alfredopacino
Apr 28 at 17:52
I do not have both those dirs. And I get
command not found
launching mysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall using brew
– alfredopacino
Apr 28 at 17:44
I do not have both those dirs. And I get
command not found
launching mysql_install_db
. It is a fresh installation I don't have any db I have to save. I don't mind wiping up the whole mysql installation. But I'm not clear what to do other than uninstall using brew
– alfredopacino
Apr 28 at 17:44
what
whereis mysql
says?– Comar
Apr 28 at 17:45
what
whereis mysql
says?– Comar
Apr 28 at 17:45
which mysql
prints /usr/local/bin/mysql
(whereis
prints nothing)– alfredopacino
Apr 28 at 17:47
which mysql
prints /usr/local/bin/mysql
(whereis
prints nothing)– alfredopacino
Apr 28 at 17:47
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to use
locate mysql
for this job.– Comar
Apr 28 at 17:50
Ah, my mistake, I have confused OS. Look for mysql configuration, binaries and files somewhere inside /usr/local, you may try to use
locate mysql
for this job.– Comar
Apr 28 at 17:50
I edited the question with my mysql bins in
/usr/local/bin
if it helps– alfredopacino
Apr 28 at 17:52
I edited the question with my mysql bins in
/usr/local/bin
if it helps– alfredopacino
Apr 28 at 17:52
add a comment |
You could simply uninstall mysql and purge configuration files if you don't need the databases or any settings.
The steps would be:
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql ## verify within my.cnf
ps. Take this with a grain of salt, as I'm not a MacOS user.
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing/usr/local/var/mysql
didn't solved..
– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:sudo rm -rf /usr/local/bin/mysql
.
– Leo
Apr 29 at 14:53
add a comment |
You could simply uninstall mysql and purge configuration files if you don't need the databases or any settings.
The steps would be:
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql ## verify within my.cnf
ps. Take this with a grain of salt, as I'm not a MacOS user.
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing/usr/local/var/mysql
didn't solved..
– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:sudo rm -rf /usr/local/bin/mysql
.
– Leo
Apr 29 at 14:53
add a comment |
You could simply uninstall mysql and purge configuration files if you don't need the databases or any settings.
The steps would be:
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql ## verify within my.cnf
ps. Take this with a grain of salt, as I'm not a MacOS user.
You could simply uninstall mysql and purge configuration files if you don't need the databases or any settings.
The steps would be:
brew uninstall mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql ## verify within my.cnf
ps. Take this with a grain of salt, as I'm not a MacOS user.
answered Apr 28 at 17:54
LeoLeo
1,515415
1,515415
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing/usr/local/var/mysql
didn't solved..
– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:sudo rm -rf /usr/local/bin/mysql
.
– Leo
Apr 29 at 14:53
add a comment |
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing/usr/local/var/mysql
didn't solved..
– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:sudo rm -rf /usr/local/bin/mysql
.
– Leo
Apr 29 at 14:53
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
I would avoid mess up the whole sistem, I will search around a little bit. macOS it's a f nightmare...
– alfredopacino
Apr 28 at 17:59
ok even removing
/usr/local/var/mysql
didn't solved..– alfredopacino
Apr 28 at 18:05
ok even removing
/usr/local/var/mysql
didn't solved..– alfredopacino
Apr 28 at 18:05
You might need to remove the binaries too, try this also:
sudo rm -rf /usr/local/bin/mysql
.– Leo
Apr 29 at 14:53
You might need to remove the binaries too, try this also:
sudo rm -rf /usr/local/bin/mysql
.– Leo
Apr 29 at 14:53
add a comment |
I got the problem, basically almost all the solution you can find around are outdated.
With mysql 8.0.15 you have to follow this guide
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Using the method UPDATE mysql.user SET authentication_string..
will lock you out from your own mysql server (you won't solve even with mysqld_safe --skip-grant-tables
).
add a comment |
I got the problem, basically almost all the solution you can find around are outdated.
With mysql 8.0.15 you have to follow this guide
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Using the method UPDATE mysql.user SET authentication_string..
will lock you out from your own mysql server (you won't solve even with mysqld_safe --skip-grant-tables
).
add a comment |
I got the problem, basically almost all the solution you can find around are outdated.
With mysql 8.0.15 you have to follow this guide
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Using the method UPDATE mysql.user SET authentication_string..
will lock you out from your own mysql server (you won't solve even with mysqld_safe --skip-grant-tables
).
I got the problem, basically almost all the solution you can find around are outdated.
With mysql 8.0.15 you have to follow this guide
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Using the method UPDATE mysql.user SET authentication_string..
will lock you out from your own mysql server (you won't solve even with mysqld_safe --skip-grant-tables
).
answered Apr 28 at 18:40
alfredopacinoalfredopacino
123116
123116
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964975%2fmysql-fixing-root-password%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown