Trying to Restore Dbase..
Moderator: Forum Moderators
Re: Trying to Restore Dbase..
If you'd like to use your old password, then yes change the ... IDENTIFIED BY 'mythtv'
value to it.
value to it.
Re: Trying to Restore Dbase..
Have run the 3 commands
and open another thread?
And I am unable to connect to the sql Dbase using:-ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
GRANT ALL ON mythconverg.* TO mythtv@localhost;
FLUSH PRIVILEGES;
BTW,.. should I close this thread as fixed, as technically I have restored the Dbase,.. I just cant use itmysql -h mythtv0 -u mythtv -p

and open another thread?
Re: Trying to Restore Dbase..
In the ALTER... above, you selected a password of 'mythtv'. Earlier you had some output that used 'lCxsunfHc'.
You can use either. Whatever's in config.xml must match what's in the DB. I was suggesting changing the
IDENTIFIED BY 'mythtv'. Perhaps you still want the lC.... one. Your choice.
You can use either. Whatever's in config.xml must match what's in the DB. I was suggesting changing the
IDENTIFIED BY 'mythtv'. Perhaps you still want the lC.... one. Your choice.
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Trying to Restore Dbase..
Good. mysql is configured to listen on localhost ONLY, and not mythtv0, so that should never work. As long as you only have a FE/BE/DB on the same machine, you can just use localhost and all will be good.
Your problem is (almost certainly) the password for mythtv. Either
Code: Select all
ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
Code: Select all
ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'CurseYouRedBaron';
Re: Trying to Restore Dbase..
Oops,.. Light bulb moment!!,. I did not realise the following statement:-Your problem is (almost certainly) the password for mythtv. Either
actuall reset the passwd to!!,..ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
I did not appreciate "IDENTIFIED BY 'mythtv';" was actually a way of saying 'set passwd',.. what a muppet I was!!
Sorry guys for my misunderstanding here.
I have reset the passwd,. using the ALTER statement,.. so I am 100% sure what my passwd is set to,
If I now try to login with the new passwd, I get<cut>
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'KCx22fHc';
Query OK, 0 rows affected (0.23 sec)
mysql> quit
Bye
and trying the wrong m/c gives a different error,.. so it would appear to be an access isssue into SQL...mark@mythtv0:~$ mysql -h mythtv0 -u mythtv -pKCx22fHc
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on 'mythtv0:3306' (111)
mark@mythtv0:~$ mysql -h mythtv1 -u mythtv -pKCx22fHc
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'mythtv1' (-3)
mark@mythtv0:~$
I have also tried the grant and flush statements as root SQL,.. but mythtv user is still unable to login
Thankyou for your help so far guys...
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Trying to Restore Dbase..
mysql -h mythtv0 -u mythtv -pKCx22fHc
Again, never going to work because mysql is ONLY LISTENING ON localhost.
Again, never going to work because mysql is ONLY LISTENING ON localhost.
Re: Trying to Restore Dbase..
but,..
logs me in to sql,.. Confused,..mysql -u mythtv -pKCx22fHc
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Trying to Restore Dbase..
Without the -h mythtv0 it's probably either using localhost, or a filesystem socket (used to be filesystem, though I don't see one on my system now).
With the -h mythtv0 it's going to use a TCP socket to connect to port 3306 on the IP of mythtv0, but nothing is listening on that IP/port. Look at, and you'll see that it is ONLY listening on 127.0.0.1 (localhost). If it said 0.0.0.0:3306 that would mean you could use any (IPv4) port to connect, so -h mythtv0 would work (you could add bind-address=* to /etc/mysql/conf.d/mythtv.cnf if you wanted it to work this way).
With the -h mythtv0 it's going to use a TCP socket to connect to port 3306 on the IP of mythtv0, but nothing is listening on that IP/port. Look at
Code: Select all
netstat -an | grep 3306
Re: Trying to Restore Dbase..
Hi guys,..
BTW why '33060' ?
Which route do I take? ie what is the correct way to address this issue
Many thanks,
As said to start with,. this is a clean install ubuntu 24.04 (basic desktop install ), only updates applied,.. and no other tweaking,.. yet.Last login: Tue Jun 18 09:22:41 2024 from 192.168.3.40
mark@mythtv0:~$ netstat -an | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN
BTW why '33060' ?
Which route do I take? ie what is the correct way to address this issue
Many thanks,
Re: Trying to Restore Dbase..
In your initial post, the error message showed a password of: lCxsunfHc but in the posts just above KCx22fHc is used.
What does the backend log show? Put it at poastebin.com and a link to it here.
What does the backend log show? Put it at poastebin.com and a link to it here.
Re: Trying to Restore Dbase..
KCx22fHc is my database passwd..
I will change later,.. once I have a solution.. and when I know how to reset things...
what I did not appreciate,.. as I said earlier, is the ' IDENTIFIED BY 'mythtv';' is another way of say set_passwd_to.
I will change later,.. once I have a solution.. and when I know how to reset things...
what I did not appreciate,.. as I said earlier, is the ' IDENTIFIED BY 'mythtv';' is another way of say set_passwd_to.
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Trying to Restore Dbase..
So your /home/mythtv/.mythtv/config.xml contains this, like it should?
Code: Select all
<Host>localhost</Host>
<UserName>mythtv</UserName>
<Password>KCx22fHc</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
Last edited by white_haired_uncle on Tue Jun 18, 2024 7:31 pm, edited 1 time in total.
Re: Trying to Restore Dbase..
@diyhouse, To be clear, the issue at this time is that the backend isn't starting. Right?
This would display the Password lines of all config.xml files: sudo find / -name "config.xml" -exec grep "<Password>" {} \;
The backend log would locate which directory is in use when it starts.
This would display the Password lines of all config.xml files: sudo find / -name "config.xml" -exec grep "<Password>" {} \;
The backend log would locate which directory is in use when it starts.
Re: Trying to Restore Dbase..
and backend log looks like this
Code: Select all
https://pastebin.com/BpPXtBSz
Re: Trying to Restore Dbase..
Code: Select all
N thread_unknown mythdirs.cpp:235 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv
E CoreContext mythdbparams.cpp:43 (IsValid) DBHostName is not set in config.xml
E CoreContext mythdbcon.cpp:247 (OpenDatabase) [DBManager0] Unable to connect to database!
E CoreContext mythdbcon.cpp:248 (OpenDatabase) Driver error was [1/1045]:#012QMYSQL: Unable to connect#012Database error was:#012Access denied for user 'mythtv'@'localhost' (using password: YES)
The 2nd line above is odd and also suggests a config.xml issue, white_haired_uncle's lines should appear in that file.
Since the DB restore worked using your user's config.xml file and the backend doesn't start with the mythtv user's
information, that suggests multiple config.xml files. This will locate all config.xml files and tell you if they're a
file or a link: sudo find / -name "config.xml" -exec ls -ld {} \;
Last edited by bill6502 on Wed Jun 19, 2024 3:38 am, edited 1 time in total.
Reason: Deleted file/links comment
Reason: Deleted file/links comment