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 » Thu Mar 04, 2010 8:41 am

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 » Fri Mar 05, 2010 2:32 pm

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 » Sat Mar 06, 2010 2:33 am

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 » Sat Mar 06, 2010 3:49 am

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 » Sat Mar 06, 2010 3:08 pm

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 » Sat Mar 06, 2010 3:29 pm

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 » Sat Mar 06, 2010 3:41 pm

"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 » Sat Mar 06, 2010 3:47 pm

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 » Sat Mar 06, 2010 3:50 pm

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 » Sun Mar 07, 2010 3:44 pm

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 » Sun Mar 07, 2010 9:08 pm

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 » Mon Mar 08, 2010 5:52 am

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 » Mon Mar 08, 2010 6:06 am

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 » Mon Mar 08, 2010 6:12 am

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 » Mon Mar 08, 2010 6:20 am

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

Who is online

Users browsing this forum: No registered users and 0 guests