Hi Experts,
Here's my story:
I download Mysql mysql-standard-4.0.17-sun-
solaris2.8
-sparc-64b
it.tar.gz
from:
http://www.mysql.com/downloads/mysql-4.0.htmland installed it on my Sun Solaris 8 ( SunOS myboxname 5.8 Generic_108528-27 sun4u
sparc) box.
I did the followings for the installation:
1) Create user - mysql on the system:
mkdir /mysql
groupadd mysql
useradd -g mysql -c 'Mysql' -d /mysql -s /bin/false mysql
chown mysql:mysql /mysql
# unpack mysql use GNU tar
cd /usr/local
tar -zxvf mysql-standard-4.0.17-sun-
solaris2.8
-sparc-64b
it.tar.gz
ln -s mysql-standard-4.0.17-sun-
solaris2.8
-sparc-64b
it mysql
#Post installtion:
scripts/mysql_install_db
chown -R root:mysql /usr/local/mysql
chgrp -R mysql /usr/local/mysql/data
bin/safe_mysqld --user=mysql &
(support-files/mysql.serve
r start)
Then I run the following test: (as root)
mysqlshow
+-----------+
| Databases |
+-----------+
| test |
+-----------+
It looks ok so far.
Then I set a PASSWORD FOR THE MySQL root USER:
./bin/mysqladmin -u root password 'new-password'
No problem with the above command, the new password is set for MySQL root
USER.
But when I did:
./bin/mysqladmin -u root -h testbox password 'new-password'
./bin/mysqladmin: connect to server at 'testbox' failed
error: 'Host 'testbox.abc.com' is not allowed to connect to this MySQL server'
After I set the new password, I cannot run mysqlshow as MySQL root USER:
root@testbox[/usr/local/my
sql] 168# mysqlshow
mysqlshow: Access denied for user: 'root@localhost' (Using password: NO)
But I still can run it as a normal user (a user in mysql group):
yuzh@testbox[/usr/local/my
sql] 178# mysqlshow
+-----------+
| Databases |
+-----------+
| test |
+-----------+
As MySQL root user, I can do:
mysql -u root -pnew-password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 4.0.17-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
It look like I still can use MySQL!
Could you please tell me how to fix the "Access denied" problem, and how to
create the "user" database so that the user can use mysql.
Thanks
yuzh
PS: I'm a Systems Administrator, but I have not used SQL for a long time,can
not remember MySQL syntax.
The last time I installed MySQL 3.22.32 from source for Solaris (X86) was
more than a year ago, this is the first time I install it use binary package.
It is now Perth time Fri Feb 6 16:03:40 WST 2004, I'll read all the comments next
Monday, thank you very much for your help.