Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 12:39:03

Author Topic: [SOLVED] Unable to change MySQL root password  (Read 21622 times)

0 Members and 1 Guest are viewing this topic.

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
[SOLVED] Unable to change MySQL root password
« on: 2017-04-27, 15:04:40 »
Just intalled a new Kloxo, but can't change root password for MySQL:
[root@odcp01 ~]# sh /script/reset-mysql-root-password mypassword
Stop MySQL service...
MySQL ROOT password reset...
Start MySQL service...
Connect failed: Access denied for user 'root'@'localhost' (using password: YES)
[root@odcp01 ~]#

Solved my mysqld --skip-grant-tables
« Last Edit: 2017-04-27, 15:17:04 by fossxplorer »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Unable to change MySQL root password
« Reply #1 on: 2017-04-27, 15:14:16 »
Always infom 'sh /script/sysinfo' for asking.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: [SOLVED] Unable to change MySQL root password
« Reply #2 on: 2017-04-27, 15:18:54 »
In CentOS7, you can't FIRST change the MySQL root password from the web UI.
I had to change it manually using mysql --skip-grant-tables, then when password was working ok, i could change it from Kloxo-MR with same password to get the "SQL Manager" login without password for admin.
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [SOLVED] Unable to change MySQL root password
« Reply #3 on: 2017-04-27, 15:26:40 »
Yes, reset mysql root password from panel still trouble under CentOS 7.

BTW, what's you mean 'using mysql --skip-grant-tables'?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: [SOLVED] Unable to change MySQL root password
« Reply #4 on: 2017-04-27, 17:19:00 »
I mean to reset lost mysql password from command line in Linux:
https://help.ubuntu.com/community/MysqlPasswordReset

Actually, you have to use mysqld --skip-grant-tables --user=mysql, otherwise it won't work, at least in CentOS7.
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [SOLVED] Unable to change MySQL root password
« Reply #5 on: 2017-04-27, 17:36:37 »
Kloxo-MR using different method. Yes, I will add '--skip-grant-tables' to fix this issue. Sadly reset from panel still not work.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: [SOLVED] Unable to change MySQL root password
« Reply #6 on: 2017-04-27, 18:45:55 »
Ok, good.

Yes, it doesn't work from web UI, but the workaround is to change it from command line and then use the same password from the web UI (MySQL Password Reset). Then at least the SQL Manager will work for the admin (otherwise it will work,but you must type in password manually).
Kloxo-MR!

Offline BigWeb.EU

  • Valuable Member
  • *
  • Posts: 114
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] Unable to change MySQL root password
« Reply #7 on: 2017-09-21, 22:39:04 »
OK, this issue came back on CentOS 6.9

Code: [Select]
[root@data etc]# sh /script/reset-mysql-root-password pass1234
Stop MySQL service...
MySQL ROOT password reset...
Start MySQL service...
Connect failed: Access denied for user 'root'@'localhost' (using password: YES)

GUI change does not work as well. Need fats solution on how to reset root password ?

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.065 seconds with 18 queries.

web stats analysis