Can't find my root's hostname in MySQL

For discussion of topics specific to MythTV on OSX
Post Reply
katsully
Newcomer
Posts: 7
Joined: Fri Jun 16, 2017 1:16 am
United States of America

Can't find my root's hostname in MySQL

Post by katsully »

Just installed MySql version 5.7.18. I went into System Preferences, MySQL, and clicked "Start MySQL Server". In terminal I accessed the root via

cd /usr/local/mysql/bin/
./mysql -u root -p
and entered the temp password I was given when I installed MySQL. I then did

SELECT Host, User FROM mysql.user;
and got

Host User

localhost mysql.sys

localhost root

I was expecting root to also have the host 127.0.0.1 and some kind of host name. What did I do wrong? Because if I set the password for 'root'@'127.0.0.1' I get Error 1133, Can't find any matching row.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Can't find my root's hostname in MySQL

Post by pvr4me »

I'm not at all an expert, but...

Does /Private/etc/my.cnf include skip_networking or similar?

What are the command line arguments used when starting the server. I think 'ps -A |grep mysql' should show you this.

Craig
Formerly the MacPorts guy.
katsully
Newcomer
Posts: 7
Joined: Fri Jun 16, 2017 1:16 am
United States of America

Re: Can't find my root's hostname in MySQL

Post by katsully »

Hi Craig,

Thank you for your response, but it's extremely unclear to me. Where does the Private directory live? And 'ps -A |grep mysql' returned a lot of stuff but I'm not sure what I'm even looking for.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Can't find my root's hostname in MySQL

Post by pvr4me »

katsully wrote:Thank you for your response, but it's extremely unclear to me. Where does the Private directory live? And 'ps -A |grep mysql' returned a lot of stuff but I'm not sure what I'm even looking for.
'/Private' is a top-level directory on your system disk. Try the following:

Code: Select all

cat /Private/etc/my.cnf
This command should dump the configuration file that MySQL is using to set defaults when it starts up.

Please post the output of the ps command and maybe we can figure out what's going on.

OTOH, I take it you want to install MySQL so that you can run Myth on Mac? (With an HDHomerun tuner box from Silicondust?) If so, you may find it easier to use my all-in-one installer. For information, see:

https://www.mythtv.org/wiki/MacPorts

The all-in-one includes a copy of MariaDB (a fork of the MySQL database software) and everything else needed to run Myth on OS X 10.9 or higher. If you do choose to go that way, you do NOT need the MySQL software that you've been fighting with. In particular, you _must_ delete or rename the '/Private/etc/my.cnf' file since it will conflict with the one my installer wants to use.

Craig
Formerly the MacPorts guy.
katsully
Newcomer
Posts: 7
Joined: Fri Jun 16, 2017 1:16 am
United States of America

Re: Can't find my root's hostname in MySQL

Post by katsully »

Hi Craig,

So because I'm doing the OS X installation I don't have a my.cnf, it's just using the default values. So maybe just doing the line SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd'); is enough and I don't need to worry about SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');?
katsully
Newcomer
Posts: 7
Joined: Fri Jun 16, 2017 1:16 am
United States of America

Re: Can't find my root's hostname in MySQL

Post by katsully »

UPDATE.....I'm using the pre-built MacPort installer. I set up the HTTP Live Streamer in Myth-Setup and got all the channels to be listed. But when I used the Myth_Start_Stop to run the backend it said it was running but neither mysql nor mythbackend showed up in Activity Monitor. And in the frontend when I try to watch Live TV the screen stays blank.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Can't find my root's hostname in MySQL

Post by pvr4me »

katsully wrote:So because I'm doing the OS X installation I don't have a my.cnf, ...
Actually you almost certainly have a my.cnf unless the MySQL installer has changed drastically in recent versions.

Please copy and paste the output from commands that you are asked to run.

Craig
Formerly the MacPorts guy.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Can't find my root's hostname in MySQL

Post by pvr4me »

katsully wrote:UPDATE.....I'm using the pre-built MacPort installer. I set up the HTTP Live Streamer in Myth-Setup and got all the channels to be listed. But when I used the Myth_Start_Stop to run the backend it said it was running but neither mysql nor mythbackend showed up in Activity Monitor. And in the frontend when I try to watch Live TV the screen stays blank.
You now have two threads going concurrently where you appear to be using different install methods. You need to pick one and be very careful to remove/deactivate the other. I take it you are going forward with my all-in-one installer version?

In Activity Monitor, you need to use the View menu to select "All Processes". The type "my" into the search/filter box and mysqld, mythbackend and mythfrontend should show in the list of processes.

That said, why the HLS Recorder? Have you carefully reviewed the notes on the wiki?

https://www.mythtv.org/wiki/User_Manual ... g_Recorder

If you have Myth running on your Mac to the stage where you can attempt to watch Live TV, the remaining issue is not likely Mac-specific. My impression is that the HLS Recorder isn't used by many people and may not be the most robust portion of Myth.

Try posting to the Troubleshooting sub-forum. You likely need to attach mythbackend and mythfrontend logs to your posting to aid analysis. Under the all-in-one installer, logs are saved to

/opt/dvr/var/log/mythtv.28

A trick to open a Finder window to that directory is to enter the following in Terminal:

Code: Select all

open /opt/dvr/var/log/mythtv.28
Use Myth_Stop_Start to restart the backend so you have a fresh new log file created for the backend. Then start the frontend and attempt to watch something via the HLS Recorder. Assuming it still doesn't work, quit the frontend and stop the backend. Attach the two newest log files to a message describing what you are attempting to do.

Craig
Formerly the MacPorts guy.
katsully
Newcomer
Posts: 7
Joined: Fri Jun 16, 2017 1:16 am
United States of America

Re: Can't find my root's hostname in MySQL

Post by katsully »

Hey Craig,

Thanks again for your reply. Clicking on 'All Processes' in Activity Monitor let me see both mythbackend and mysqld. I can start up Myth_Frontend and go to Watch Live TV, but then I get an error, Taking more than 60000 ms. I'll post to another forum. Thanks again for your help.
Post Reply