I couldn't change root user password on mysql with --skip-grant-tables Announcing the arrival...
What's the meaning of "fortified infraction restraint"?
How fail-safe is nr as stop bytes?
Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?
How to run automated tests after each commit?
Converted a Scalar function to a TVF function for parallel execution-Still running in Serial mode
What does Turing mean by this statement?
Crossing US/Canada Border for less than 24 hours
Do I really need to have a message in a novel to appeal to readers?
Why is it faster to reheat something than it is to cook it?
What is the meaning of 'breadth' in breadth first search?
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
Would it be easier to apply for a UK visa if there is a host family to sponsor for you in going there?
Is it possible for SQL statements to execute concurrently within a single session in SQL Server?
How to unroll a parameter pack from right to left
Put R under double integral
What initially awakened the Balrog?
Can a new player join a group only when a new campaign starts?
AppleTVs create a chatty alternate WiFi network
Is there any word for a place full of confusion?
How to make a Field only accept Numbers in Magento 2
How to get all distinct words within a set of lines?
Find 108 by using 3,4,6
Exposing GRASS GIS add-on in QGIS Processing framework?
How much damage would a cupful of neutron star matter do to the Earth?
I couldn't change root user password on mysql with --skip-grant-tables
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How to change data location on UbuntuHow do you disable anonymous login?Set particular database connection temporarily to read-onlyMySql 5.6 error (Table 'mysql.user' doesn't exist) when started as a daemonRestoring MySQL dump ERROR 1449Host not Allowed Connectivity to MySQL ServerMysql will no longer start after DB import and password changeDefault user Accounts in MysqlError 1045 (28000): Access denied for user 'myuser'@'localhost' (using password: YES)Reset my root password, now I can't see my main database
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am very new at mysql
and have struggled to change root
user password in mysql
.
(I have never set root password but it asks me root
password.)
The below is what I have done.
One thing I suspect is that flush privileges
results 0 rows affected
.
Could you give me a suggestion?
$ sudo service mysql stop
$ sudo mysqld_safe --skip-grant-tables &
[1] 5395
sangmin@ubuntu:~$ 170201 00:32:55 mysqld_safe Logging to syslog.
170201 00:32:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
$ ps -e | grep mysql
5396 pts/6 00:00:00 mysqld_safe
5545 pts/6 00:00:00 mysqld
$ mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> update user set password=PASSWORD("root") where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit
Bye
$ sudo service mysql restart
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ mysql -uroot -proot
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql ubuntu
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am very new at mysql
and have struggled to change root
user password in mysql
.
(I have never set root password but it asks me root
password.)
The below is what I have done.
One thing I suspect is that flush privileges
results 0 rows affected
.
Could you give me a suggestion?
$ sudo service mysql stop
$ sudo mysqld_safe --skip-grant-tables &
[1] 5395
sangmin@ubuntu:~$ 170201 00:32:55 mysqld_safe Logging to syslog.
170201 00:32:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
$ ps -e | grep mysql
5396 pts/6 00:00:00 mysqld_safe
5545 pts/6 00:00:00 mysqld
$ mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> update user set password=PASSWORD("root") where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit
Bye
$ sudo service mysql restart
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ mysql -uroot -proot
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql ubuntu
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am very new at mysql
and have struggled to change root
user password in mysql
.
(I have never set root password but it asks me root
password.)
The below is what I have done.
One thing I suspect is that flush privileges
results 0 rows affected
.
Could you give me a suggestion?
$ sudo service mysql stop
$ sudo mysqld_safe --skip-grant-tables &
[1] 5395
sangmin@ubuntu:~$ 170201 00:32:55 mysqld_safe Logging to syslog.
170201 00:32:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
$ ps -e | grep mysql
5396 pts/6 00:00:00 mysqld_safe
5545 pts/6 00:00:00 mysqld
$ mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> update user set password=PASSWORD("root") where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit
Bye
$ sudo service mysql restart
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ mysql -uroot -proot
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql ubuntu
I am very new at mysql
and have struggled to change root
user password in mysql
.
(I have never set root password but it asks me root
password.)
The below is what I have done.
One thing I suspect is that flush privileges
results 0 rows affected
.
Could you give me a suggestion?
$ sudo service mysql stop
$ sudo mysqld_safe --skip-grant-tables &
[1] 5395
sangmin@ubuntu:~$ 170201 00:32:55 mysqld_safe Logging to syslog.
170201 00:32:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
$ ps -e | grep mysql
5396 pts/6 00:00:00 mysqld_safe
5545 pts/6 00:00:00 mysqld
$ mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 2
Server version: 10.0.29-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> update user set password=PASSWORD("root") where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit
Bye
$ sudo service mysql restart
[1]+ Done sudo mysqld_safe --skip-grant-tables
$ mysql -uroot -proot
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql ubuntu
mysql ubuntu
asked Feb 1 '17 at 8:49
asleeaasleea
138128
138128
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 9 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.
Then, once you enter to mysql you should first do:
mysql> FLUSH PRIVILEGES;
And to chance your password you should use the ALTER USER instruction:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');
After that, disconnect again and restart your server, that should do it.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2fdba.stackexchange.com%2fquestions%2f162839%2fi-couldnt-change-root-user-password-on-mysql-with-skip-grant-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.
Then, once you enter to mysql you should first do:
mysql> FLUSH PRIVILEGES;
And to chance your password you should use the ALTER USER instruction:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');
After that, disconnect again and restart your server, that should do it.
add a comment |
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.
Then, once you enter to mysql you should first do:
mysql> FLUSH PRIVILEGES;
And to chance your password you should use the ALTER USER instruction:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');
After that, disconnect again and restart your server, that should do it.
add a comment |
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.
Then, once you enter to mysql you should first do:
mysql> FLUSH PRIVILEGES;
And to chance your password you should use the ALTER USER instruction:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');
After that, disconnect again and restart your server, that should do it.
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.
Then, once you enter to mysql you should first do:
mysql> FLUSH PRIVILEGES;
And to chance your password you should use the ALTER USER instruction:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');
After that, disconnect again and restart your server, that should do it.
answered Feb 1 '17 at 16:05
Mauricio CachoMauricio Cacho
338211
338211
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- 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%2fdba.stackexchange.com%2fquestions%2f162839%2fi-couldnt-change-root-user-password-on-mysql-with-skip-grant-tables%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