LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-20-2018, 10:45 PM   #1
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Rep: Reputation: Disabled
Ubuntu LAMP unable to log in to mysql using clients


Upgraded a 16.04 LTS HTPC box (running for some years) to 18.04 LTS

Failed miserably; keyboard not working, mysql login failed, gave up.

New 18.04 LTS install. dist-upgrade and installed LAMP stack.

Tested mysql>

Noted mysql login from command line failed. STuffed around on the 'net troubleshooting for several hours. Finally worked out there is no default password on mysql. Evenutally got to mysql from command line and set up 'root'@'localhost' plus two other users, all with GRANT ALL using PASSWORD. Coool. Worked ok from command line.

Tried mythtv; no access to database (???)

Tried client (phpmyadmin and mysql-workbench) on localhost - "Access denied for user root@localhost'

Tried login from shell. All good.

So I can login OK from the command line but no other client software on localhost has access to mysql. WTF??

There is nothing left on the web to help me on why the command line mysql login works but other mysql clients fail.

Any help, anyone?
 
Old 12-21-2018, 05:07 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by FrizzledOldButt View Post
Tried client (phpmyadmin and mysql-workbench) on localhost - "Access denied for user root@localhost'

Tried login from shell. All good.

You need to issue explicit grant statements
due to possibly running or have run (installer) of mysql_secure_installation Section 2.10, “Postinstallation Setup and Testing”.

Search for mysql at https://help.ubuntu.com and have at it.
 
Old 12-21-2018, 05:26 PM   #3
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
You need to issue explicit grant statements
due to possibly running or have run (installer) of mysql_secure_installation Section 2.10, “Postinstallation Setup and Testing”.

Search for mysql at https://help.ubuntu.com and have at it.
Thanks. I'll bear it in mind next time.

However, the issue was the lack of a password for mysql root. I eventually managed to assign one from the command line. phpmyadmin & mysql-workbench worked after that </sigh> - I've since read there are supposed to be settings in phpmyadmin workbench to log in with password less user accounts. I couldn't find them.

Regarding the mythtv backend login, there's a bit of a gotcha; the installer assigns a random password to mysql user mythtv. However, in the initial setup and user account it issues 'mythtv' as the password. The correct password can be seen in /home/mythtv/.mythtv/config.xml

Copying /home/mythtv/.mythtv/config.xml to /home/<user>/.mythtv/config.xml BEFORE running mythtv backend configuration resolves the issue.
 
  


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
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
[SOLVED] after installation of MySQL could not log into mysql using temporary password in /var/log/mysqld.log User247 Linux - Server 2 12-25-2017 09:31 AM
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
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 03:03 AM
LXer: LAMP vs. LAMP LXer Syndicated Linux News 0 08-22-2006 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:27 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