LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-26-2019, 07:32 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
Stuck after Mysql upgrade from 5.1 to 5.7


Hello

I upgraded mysql server to version 5.7

Code:
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el6-10.noarch.rpm
yum install mysql-community-client mysql-community-server
After this I was not able to restart mysql. I found solution (on internet) :
Code:
vi /etc/my.cnf
skip-grant-tables
innodb_data_file_path = ibdata1:10M:autoextend
But I am not able to log in as root user :
Code:
mysql -u root -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Doing mysql_upgrade to try resolve this gives :
Code:
mysql_upgrade
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
I also read on the internet about "grep 'temporary password' /var/log/mysqld.log", but this gives no result for me.

The following also fails :
Code:
mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Access denied for user 'root'@'localhost' (using password: YES)
So, I am stuck.

Last edited by jonaskellens; 06-26-2019 at 07:33 AM.
 
Old 06-26-2019, 09:27 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Did you check to see if you can upgrade from 5.1 to 5.7? That is a big jump and major changes...
http://mysqlserverteam.com/upgrading...ith-mysqldump/

I am hoping you have backups of the DBs, then revert back to 5.1 and perform upgrade as per documentation...
 
Old 06-26-2019, 09:57 AM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Reverting to 5.1 is failing with major errors in /var/log/mysqld.log.

I did not check that document. It seems a huge version jump indeed.

By now I am able to log in again with following steps :
1 "skip-grant-tables" in /etc/my.cnf
2 "service mysqld restart"
3 "use mysql; update user set authentication_string=PASSWORD("NewPasswd") where User='root'; flush privileges;"

Code:
mysql --version
mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper
I now have the strange thing that in PhpMyAdmin the tab "Users" is emtpy. It does not load.
Also PhpMyAdmin gives strange info :
Code:
Server version: 5.1.73 - Source distribution
Client version: libmysql - 5.1.72
It seems it does not see the correct MySQL version.

Last edited by jonaskellens; 06-26-2019 at 09:58 AM.
 
Old 06-27-2019, 07:19 AM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by jonaskellens View Post
I did not check that document. It seems a huge version jump indeed.

By now I am able to log in again with following steps :
1 "skip-grant-tables" in /etc/my.cnf
2 "service mysqld restart"
3 "use mysql; update user set authentication_string=PASSWORD("NewPasswd") where User='root'; flush privileges;"

Code:
mysql --version
mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper
Good!

Quote:
Originally Posted by jonaskellens View Post
I now have the strange thing that in PhpMyAdmin the tab "Users" is emtpy. It does not load.
Also PhpMyAdmin gives strange info :
Code:
Server version: 5.1.73 - Source distribution
Client version: libmysql - 5.1.72
It seems it does not see the correct MySQL version.
From command line, login to mysql, then run this:

Code:
select * from mysql.user;
Do you see all the users from before upgrade?
 
Old 06-27-2019, 07:35 AM   #5
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by dc.901 View Post
Good!
From command line, login to mysql, then run this:

Code:
select * from mysql.user;
Do you see all the users from before upgrade?
Yes they are present.
 
Old 06-27-2019, 08:53 AM   #6
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by jonaskellens View Post
Yes they are present.
Great. Now, as for your applications (that use databases on this MySQL instance), are all of them functioning?
If so, may be reinstalling phpmyadmin will resolve its issues. I do not use phpmyadmin, so can't help you much with it
 
Old 06-27-2019, 12:49 PM   #7
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by dc.901 View Post
Great. Now, as for your applications (that use databases on this MySQL instance), are all of them functioning?
If so, may be reinstalling phpmyadmin will resolve its issues. I do not use phpmyadmin, so can't help you much with it
An application of mine that uses a particular mysql user is unable to connect. Mysql err log says :
Code:
2019-06-27T17:47:33.263349Z 68465 [Note] Access denied for user 'MyUser'@'localhost' (using password: YES)
PhpMyAdmin latest version got installed together with mysql-community-server-5.7.26-1 :
Code:
Package phpMyAdmin-4.0.10.20-1.el6.noarch already installed and latest version
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 02:21 PM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 10:32 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration