View Full Version : Mysql root password problem>??

26th June 2006, 23:39

I was going through the setting up a "perfect_setup_ubuntu_6.06_p4" and right at the bottom it mentions these two commands;

* mysqladmin -u root password yourrootsqlpassword
* mysqladmin -h itworkz.co.uk -u root password yourrootsqlpassword

However, I get these two messages;

* mysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: NO)'
* mysqladmin: connect to server at 'itworkz.co.uk' failederror: 'Host 'itworkz.co.uk' is not allowed to connect to this MySQL server'

I take it "yourrootsqlpassword" is one i'm supposed to have setup? If so can you explain how I would go about setting these passwords, as I know these are very important!

This is the page in question --

I'm new to Ubuntu but not scarred of command line executions so i'm hoping to learn quick fast I have beenusing windows since 3.1 missed out 95 straight to 98SE then XP played a bit with server edition - as i'm wanting to run my own server. After searching the net realised Linux does the best job and
have tested several version and settled for Ubuntu.

26th June 2006, 23:59
Is mysql server up and running ?
do any thing?
and what does
show ?

27th June 2006, 00:29
My SQL after doing netstat -tap is showing as being up and available.

Hostname is showing a itworkz
Hostname -f is showing itworkz.co.uk

MySQL is running I have not turned it off.

27th June 2006, 00:36
If typing mysql drops you too a prompt like so

Check docs here for securing it
select docs for a version to fit your needs

27th June 2006, 00:39
I get this when typing mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

27th June 2006, 00:43
mysql -h itworkz.co.uk -u root -p

then supplying the pass you may have set gives ?


mysql -u root -p

27th June 2006, 00:49
I typed what was written exactly with out thinking so I put yourrootsqlpassword as password, doh!

after typing mysql -h itworkz.co.uk -u root -p I get >

ERROR 1130 (00000): Host 'itworkz.co.uk' is not allowed to connect to this MySQL server

and after

mysql -u root -p i get

Your MySQL connection id is 25 to server version: 5.0.22-Debian_0ubuntu6.06-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


and I used yourrootsqlpassword hmm

Proper screwed this up some how didn't I!!

27th June 2006, 00:54
It's nothing major now you are in you can read up and secure it correctly
Hope it all works out for you

27th June 2006, 00:59
Cool thanks for your help :) man

27th June 2006, 13:28
So it's working now? :)

11th December 2006, 06:23
Greetings again,

I have followed the tutorial to the letter.

Right up until i have to enter the 2nd mysqladmin command, everything is going smooth.

However at that point it says I am unable to connect to the server.

Having read this thread, i tested the commands specified by platd, I find I also have connectivity to mysql with the following:

[root@mmm named]#mysql -u root -p

this then requests a password, which is my root password, and this provides me with the mysql prompt.

I am also able to supply:

[root@mmm named]#mysql -h mmm.xxxxx.net.au -u root -p

this then requests a password, which is my root password, and this provides me with the mysql prompt.

I however did not just cut and paste the mysqladmin commands, and I did use my own root password.

Only difference between mine, and the person creating this thread is:

hostname mmm.xxxxxxx.net.au
hostname -f mmm.xxxxxxx.net.au

When configuring the network interface manually(final stages of FC5 installation), it asks for a manual entry. Here i supplied mmm.xxxxxx.net.au.
Should this have just been 'localhost' perhaps, or 'mmm' instead of the 'mmm.xxxxxx.net.au'?

This will be installation attempt 9, and im just about over it. The first time I completed an FC5/ISPConfig installation, there were some minor issues, but this is getting stranger and stranger.

Please, any advice would be appreciated.

11th December 2006, 06:40
Greetings again,

I just tried to telnet into mysql with:

telnet mmm.xxxxxx.net.au 3306

and got...

Connected to localhost.localdomain (
Escape character is '^]'
5.0.27{dcCdN<}$7'__L&vB':OConnection close by foriegn host.

netstat -tap provides me with the required output as found in FC5 installation docs.

sorry for the trouble.

11th December 2006, 10:02
Frustation has won again.....

After a complete resinstallation...again...there was some strange alias listings in the network config tool. They have been fixed, prior to mysql yum install.

now.. there has been some slight advancement, but now the error is slightly different.

All logins/passwords are as root.

when entering:

mysqladmin -h mmm.xxxxx.net.au -u root password mypasswd

it says:'mysqladmin: Can't turn off logging; Error: Access denied: you need to have SUPER privilege to perform this operation'

root passwords still permit me mysql access with >mysql -u root -p

anyways...unbelievably frustrated seriously chasing some helpful advice.

Thanks in advance.

hmm ps: Postgres I know wont permit the root to change passwords, one must login as 'postges' to enforce changes(in postgres, there is no root user). Could this also be a mysql issue? i know im reaching now but...

12th December 2006, 14:31
Did you disable SELinux?

What's the output of netstat -tap and ifconfig? What's in /etc/hosts?

13th December 2006, 05:13
Thanks Falko,

No idea what it was, but a fresh start from scratch has seen it go through this time......go figure.

however, i now have a conflicting certificate after the ispconfig installation completes, and i try to access the admin panel.

So i will start going through the forums again.

Thanks again.

13th December 2006, 11:35
To save you the search see: http://www.howtoforge.com/forums/showthread.php?p=52321#post52321