ZMLarch MySQL root password?

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

ZMLarch MySQL root password?

Post by troyy0206 »

I can't find it anywhere. Anyone???

I want to build a console that displays links to all my cameras, events, etc. I have 5 servers across two locations and I want to make it as easy as possible for the users to manage.
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

Having some real problems with this. I get "not allowed to connect". From what I've read it has something to do with the hostname in MySQL not matching the real host name of the computer. It's my understanding I need to reset the root password to MySQL in order to get into it to fix this, but all the instructions I have found don't seem to work. They say I have to stop mysqld and start it in safe mode. It appears to try to start in safe mode but never goes back to a prompt so I can do the commands. If someone could post specific instructions on what I need to do to be able to access the ZM MySQL database remotely, I would appreciate it.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

There is no password set for mysql user "root", so you can set your own. If you launch firefox in zmlarch the homepage document tells you this.

To connect remotely you will need to comment the the line that says "skip networking" in /etc/my.cnf and then restart mysqld.

Are you sure you want to connect remotely using the "root" account?
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote:There is no password set for mysql user "root", so you can set your own. If you launch firefox in zmlarch the homepage document tells you this.

To connect remotely you will need to comment the the line that says "skip networking" in /etc/my.cnf and then restart mysqld.

Are you sure you want to connect remotely using the "root" account?
My problem is that I'm not a Linux kind of guy so it's easier for me to use the Windows MySQL admin tool to administer the databases, users, permissions, etc. So, yes I want to connect with root remotely to admin the MySQL server. I have already commented out the "skip networking" line and it did not help. I'm getting a "not allowed to connect" message. From what I've read, you have to correct some kind of incorrect host name setting in MySQL to be able to connect. I just can't quite figure it out.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

So, yes I want to connect with root remotely to admin the MySQL server. I have already commented out the "skip networking" line and it did not help. I'm getting a "not allowed to connect" message.
And you set a password for mysql user "root"?
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote:And you set a password for mysql user "root"?
I tried following the instructions I found on how to do that but it wouldn't work. It said I had to kill mysqld and start it in safe mode, then issue some commands at the mysql> prompt. But, when I start it up it appears to start and just kind of hangs. It never goes back to the prompt so I can enter anything. Is there a better way to do this?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

"mysqladmin -u root password <newpassword>"

Then check by running "mysql -u root -p"
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote:"mysqladmin -u root password <newpassword>"

Then check by running "mysql -u root -p"
running this as root, I get:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote:"mysqladmin -u root password <newpassword>"

Then check by running "mysql -u root -p"
Specifically what I typed...if my new password were going to be "letmein", I would type:

mysqladmin -u root password letmein

that's when I get the error

You're right (as if you didn't know that) and the root password is blank, I just can't get a new one set for some reason. I'm assuming it won't connect remotely because root's password is blank?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

You may be bit by a bug in the hostname setup on installed systems. Edit both /etc/rc.conf and /etc/hosts and make sure the hostname in both is the same. The zmhost_nn(n)_nn(n) from the livecd network setup needs to either be changed to match the /etc/rc.conf hostname or vice versa. Of course you can choose a completely different unique hostname if you want. Just make sure it matches in both files. Then a reboot and try again to set the mysql password.
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote:You may be bit by a bug in the hostname setup on installed systems. Edit both /etc/rc.conf and /etc/hosts and make sure the hostname in both is the same. The zmhost_nn(n)_nn(n) from the livecd network setup needs to either be changed to match the /etc/rc.conf hostname or vice versa. Of course you can choose a completely different unique hostname if you want. Just make sure it matches in both files. Then a reboot and try again to set the mysql password.

No, it's not that, been there. In fact, from what I could tell, ZM won't even work if this isn't fixed.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

You wrote:
running this as root, I get:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
You are passing the -p switch when no password is set
(using password: YES)
To set the password the first time you must enter the command without the -p switch
"mysqladmin -u root password <newpassword>"
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

rdmelin wrote: To set the password the first time you must enter the command without the -p switch
"mysqladmin -u root password <newpassword>"
No, I did not use -p. Here is exactly what I did and what I get:

[/home/user]# mysqladmin -u root password letmein
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
[/home/user]#
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

Finally found this syntax which helped me get it reset. Thanks for the help!

If you would like to change current password d3s9cXq to OlzzYs$qz, enter the following command:
# mysqladmin -u root -p password "OlzzYs$qz"
Output:

Enter password: <enter>
troyy0206
Posts: 45
Joined: Fri Oct 30, 2009 1:54 am

Post by troyy0206 »

Now that I have set the root password and verified it, it still does not let me connect remotely. skip-networking is commented out. I'm allowing all hosts in the hosts.allow file.

Any other suggestions?
Post Reply