[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Q: Setting up mysql



Hi guys, I've got some more questions.

I must admit up front that I don't know that much about mysql.  I've been
reading the docs, but the things stated therein don't seem to help me very
much.  But I'm hoping that my questions are simple enough that either someone
will know the answer straight away, or someone can point me to the answer with
a link.

I'm trying to set up mysql-server-4.1.  (Actually, I'm trying to write a
script that will do this for me...)

I've edited /etc/mysql/my.cnf, my only change was to comment out bind-address
so that I could connect from a remote host:

52c50,51
< bind-address		= 127.0.0.1
---
> # bind-address            = 127.0.0.1

The next thing my script does is restart mysql.  A quick check with netstat
shows what ports mysql is listening on:

  # netstat -tlnp | grep mysql
  tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN  
  15662/mysqld

Next I attempt to set the root password with the following command:

  mysqladmin -u root password '<password>'

This is the command listed in
/usr/share/doc/mysql-server-4.1/README.Debian.gz., but it bombs with the
following error:

  mysqladmin: connect to server at 'localhost' failed
  error: 'Access denied for user 'root'@'localhost' (using password: YES)'

I can connect using mysql -u root -- at least I think I can:

  # mysql -u root
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 26 to server version: 4.1.11-Debian_4sarge2-log

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

  mysql> connect mysql
  Reading table information for completion of table and column names
  You can turn off this feature to get a quicker startup with -A

  Connection id:    27
  Current database: mysql

  mysql> quit
  Bye

And I can run mysql-admin and browse through stuff.  So why doesn't mysqladmin
allow me to change the password?

Hopelessly clueless and thankful for your help,

Michael



-- 
Michael Peek                                                 peek@tiem.utk.edu
------------------------------------------------------------------------------
Systems Administrator / C++ Database Programmer      569 Dabney Hall
Department of Ecology and Evolutionary Biology       Knoxville, TN  37996-1610
University of Tennessee at Knoxville
------------------------------------------------------------------------------
(865)974-0224 phone, (865)974-3067 fax           http://www.tiem.utk.edu/~peek



Reply to: