473,851 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I just ran /usr/bin/mysql_install_d b and it told me to set a password for the MySQL root USER. I cannot.

MLH
I'm supposed to set a password for the MySQL root user. The output of
mysql_install_d b instructed me to run the following commands...
/usr/bin/mysqladmin -u root -h appserver password mynwewpasswd
I did. It did not work. Here's the error:
/usr/bin/mysqladmin: connect to server at 'appserver' failed
error: 'Host 'appserver.crci .com' is not allowed to connect to this
MySQL server'

Another command I'm supposed to run also resulted in an error. Here
is the command and the ensuing error...
/usr/bin/mysqladmin -u root password mynewpassword
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost ' (Using password: NO)'

Can anyone tell me why I am getting these error messages and how
I can successfully set a password for the MySQL root user?

xxxxxxxxxxxxxxx xx mysql_install_d b screen output xxxxxxxxxxxxxxx xxxx
Here's text of /usr/bin/mysql_install_d b output to screen...

Installing all prepared tables

To start mysqld at boot time you have to copy
support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/etc/init.d/mysql start (you have to start the server first!)
/usr/bin/mysqladmin -u root -h appserver password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privi lege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench'
directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

Jul 23 '05 #1
5 4321
MLH wrote:
/usr/bin/mysqladmin -u root -h appserver password mynwewpasswd
I did. It did not work. Here's the error:
/usr/bin/mysqladmin: connect to server at 'appserver' failed
error: 'Host 'appserver.crci .com' is not allowed to connect to this
MySQL server'
This depends on the privileges set up for MySQL on that host. It's
certainly possible that it's configured to deny _any_ account from
connecting from another host. Or it could be that it's configured to
deny root when you don't supply a password.

The "-u root" without an accompanying "-p" means "I want to connect as
root, without giving a password." It's not unusual for people to
configure MySQL to disallow this.

The requirement to specify the "-p" option is there because MySQL also
allows you to configure accounts so that they _can_ connect without
requiring the password. You could even configure one account such that
if you don't specify a password, you get some limited privileges, but if
you do specify a password for the same account, you get a different set
of privileges! So there has to be a way to run the mysql commands both
with and without specifying a password. IMHO, the syntax they've chosen
to implement this feature isn't necessarily the most clear in
retrospect, but there might have been some historical reason for them to
do it the way they did.
/usr/bin/mysqladmin -u root password mynewpassword
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost ' (Using password: NO)'


This means that you tried to connect as root to set root's password, but
you specified no password. MySQL seems to want root's current
password before it'll let you do that.

Sounds like you should contact the person who sold you this server, and
ask what is the current MySQL root password.

Regards,
Bill K.
Jul 23 '05 #2
MLH
On Sun, 27 Mar 2005 20:06:13 -0800, Bill Karwin <bi**@karwin.co m>
wrote:
MLH wrote:
/usr/bin/mysqladmin -u root -h appserver password mynwewpasswd
I did. It did not work. Here's the error:
/usr/bin/mysqladmin: connect to server at 'appserver' failed
error: 'Host 'appserver.crci .com' is not allowed to connect to this
MySQL server'


This depends on the privileges set up for MySQL on that host. It's
certainly possible that it's configured to deny _any_ account from
connecting from another host. Or it could be that it's configured to
deny root when you don't supply a password.

The "-u root" without an accompanying "-p" means "I want to connect as
root, without giving a password." It's not unusual for people to
configure MySQL to disallow this.

The requirement to specify the "-p" option is there because MySQL also
allows you to configure accounts so that they _can_ connect without
requiring the password. You could even configure one account such that
if you don't specify a password, you get some limited privileges, but if
you do specify a password for the same account, you get a different set
of privileges! So there has to be a way to run the mysql commands both
with and without specifying a password. IMHO, the syntax they've chosen
to implement this feature isn't necessarily the most clear in
retrospect, but there might have been some historical reason for them to
do it the way they did.
/usr/bin/mysqladmin -u root password mynewpassword
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost ' (Using password: NO)'


This means that you tried to connect as root to set root's password, but
you specified no password. MySQL seems to want root's current
password before it'll let you do that.

Sounds like you should contact the person who sold you this server, and
ask what is the current MySQL root password.

Regards,
Bill K.


xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxx
Thank-you very much, Bill. You are a genius. Everything you
said was right. I contacted the guy & he gave me the password.
I am successfully logging in now, on my way to completing the
objective of running source on the dump file, I'm sure. Here's
some screen capture showing you what I've successfully been
able to accomplish...

Script started on Mon Mar 28 13:16:04 2005
mlh@appserver mlh $ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 4.0.22

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

mysql> select user();
+---------------+
| user() |
+---------------+
| mlh@localhost|
+---------------+
1 row in set (0.00 sec)

mysql> quit
Bye
mlh@appserver mlh $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 4.0.22

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

mysql> select user();
+----------------+
| user() |
+----------------+
| root@localhost|
+----------------+
1 row in set (0.00 sec)

mysql> quit
Bye
mlh@appserver mlh $ su dewey
Password:
dewey@appserver mlh $ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.0.22

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

mysql> select user();
+-----------------+
| user() |
+-----------------+
| dewey@localhost |
+-----------------+
1 row in set (0.00 sec)

mysql> quit
Bye
dewey@appserver mlh $ exit
exit
mlh@appserver mlh $ exit

Script done on Mon Mar 28 13:24:24 2005

==> I am slightly confused about the return values from
the two ANONYMOUS logins shown above. I would have
expected the USER( ) function to return a name like
anonymous@local host instead of mlh or dewey at localhost.
Is that considered normal?
Jul 23 '05 #3
MLH wrote:
==> I am slightly confused about the return values from
the two ANONYMOUS logins shown above. I would have
expected the USER( ) function to return a name like
anonymous@local host instead of mlh or dewey at localhost.
Is that considered normal?


On Linux, yes. The "anonymous" login functionality allows you to
connect without providing a password. MySQL detects your username as
your Linux login, and the USER() function returns that string. MySQL
"trusts" that you have been authenticated by the operating system if you
got far enough to run the 'mysql' command.

This isn't very reliable or secure by many people's standards, though.
So for servers where security is considered important, one can disable
anonymous logins on their MySQL installations.
Read http://dev.mysql.com/doc/mysql/en/de...rivileges.html for more
information on that topic.

Regards,
Bill K.
Jul 23 '05 #4
Bill Karwin wrote:
On Linux, yes. The "anonymous" login functionality allows you to
connect without providing a password.


That's wrong. The anonymous login is not _necessarily_ passwordless,
though that is the configuration that ships with the product.

Sorry for the misinformation,
Bill K.
Jul 23 '05 #5
MLH
Misinformation that's now corrected. Who am I to complain?
Thx for helping out In another thread, I'm addressing the issue
of trying to telnet to the linux box over port 3306 (just to ensure
that port 3306 is really workikng for me). ... until my linux server
will respond to a command like
this: telnet 192.168.1.106 3306
I haven't got a snowball's chance of attaching to my mysql
tables on that same linux server, right? I'm afraid I don't know
how to configure the linux box to allow that, but that's a subject
for another news group. Let me see what I can find out and I'll
revisit this topic with this group after I can telnet in over port
3306. Thx.

xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx

On Thu, 31 Mar 2005 10:00:36 -0800, Bill Karwin <bi**@karwin.co m>
wrote:
Bill Karwin wrote:
On Linux, yes. The "anonymous" login functionality allows you to
connect without providing a password.


That's wrong. The anonymous login is not _necessarily_ passwordless,
though that is the configuration that ships with the product.

Sorry for the misinformation,
Bill K.


Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1680
by: Doruk Fisek | last post by:
Hi, I am compiling MySQL 4.0.14 with GCC 3.2.3, Glibc 2.3.1 and Linux 2.4.21 on a x86. CFLAGS="-O2 -march=athlon" CXX=gcc CXXFLAGS="-march=athlon -O2 -felide-constructors" ./configure --prefix=/usr/local/mysql --with-charset=latin5 --without-docs --with-mysqld-ldflags=-all-static --disable-shared --with-client-ldflags=-all-static --without-innodb
0
1435
by: Simon | last post by:
Hi, I'm trying to get a version of MySQL 4.1.0 installed on my (Gentoo Linux) machine. I have a copy of MySQL 4.0.13 already installed, using Gentoo's ebuilds, but am trying to install 4.1.0 in a side-by-side configuration. (Into /usr/local/mysql_alpha, talking to port 3300) - So I can run 4.0 as my "production" server, and muck about with 4.1.0 while I'm testing out the new features. I'm compiling it from source. Here is what I used...
0
1947
by: PiEmme | last post by:
On a Linux server a MySql db is installed. I was able to run mysql and mysqladmin without entering user and password, at first. Later both user and password have become required. Probably after granting root user to two different php applications accessing db's (applA, dbA, user=root, pwd=pwdA; applB, dbB, user=root, pwd=pwdB). Now all db's have user=root with password=uniquePwd. How can I reset, and have user and pwd no more requested?
0
12040
by: Ike_strong | last post by:
Can anyone help me to figure out why each time I try to access my database using: c:\mysql\bin\inmysql -root -p and afterwards:(i.e. after inputting my at the password prompt) Enter Password: '******' I get the following:
12
2868
by: Florian | last post by:
I've been stumbling over this, what I consider strange, behaviour. I installed mySQL on a Win2k machine and tried to change the root password, which didn't seem to work. I changed it this way: c:>mysql mysql> use mysql mysql> update user set password=PASSWORD('test') where user='root'; mysql> exit
1
3307
by: Adam Smith | last post by:
I have a new DB provided by my ISP don't know details of installation, setup etc. I can log in as anybody except root. mysql -h localhost -u mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 71 to server version: 4.0.16-log mysql -h localhost -u xxxxx
18
3167
by: Frances | last post by:
I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for 2 years now, and even though I know there are ways you can use PHP in conjunction with Tomcat, I'd rather not tinker with Tomcat.. I think I'd rather try to do it straight 'from scratch'... following instructions here, http://us2.php.net/tut.php.. so you need both Apache **AND** PHP server? not sure what to dl when get to http://www.apache.org/ (HTTP Server? top...
7
161321
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ########################################### package MySQL-client-5.0.24a-0.glibc23 is already installed package MySQL-server-5.0.24a-0.glibc23 is already installed
2
3804
by: ivytony | last post by:
First of all, I'm not sure if I've set up root password for MySQL server or not. I was following this tutorial http://www.howtoforge.com/centos-5.1-server-lamp-email-dns-ftp-ispconfig-p4 to install mysql on my CentOS 5 server. When I run 'mysqladmin -u root password yourrootsqlpassword', I got this error message: Then I go to MySQL prompt running ' mysql -uroot -pPassword' (Password is replaced by actual password) When I am on MySQL...
0
9747
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11017
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10728
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9505
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7905
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5933
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4548
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.