473,799 Members | 2,761 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 4313
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
1679
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
1432
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
1944
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
12036
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
2865
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
3301
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
3163
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
161315
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
3803
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
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10485
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...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
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...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
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
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.