Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52636 - post install instructions result in "Host xxx not allowed to connect to this MySQL server" error
Summary: post install instructions result in "Host xxx not allowed to connect to this ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-31 16:25 UTC by Zeek
Modified: 2004-09-06 19:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zeek 2004-05-31 16:25:43 UTC
After creating a new mysql DB, it gives instructions on how to setup the root user and password.

If you follow the instructions to the letter you get this error:

  error: 'Host 'xxx' is not allowed to connect to this MySQL server'


mlibrary mysql # /usr/bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables

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 mlibrary password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

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
mlibrary mysql # /etc/init.d/mysql start
 * Starting mysqld...                                                                                    
mlibrary mysql # /usr/bin/mysqladmin -u root -h mlibrary password 'asdf'
/usr/bin/mysqladmin: connect to server at 'mlibrary' failed
error: 'Host 'mlibrary.fdsa.com' is not allowed to connect to this MySQL server'


Reproducible: Always
Steps to Reproduce:
1.  emerge mysql
2.  /usr/bin/mysql_install_db
3.  /etc/init.d/mysql start
4.  /usr/bin/mysqladmin -u root -h mlibrary password 'asdf'

Actual Results:  
error: 'Host 'mlibrary.fdsa.com' is not allowed to connect to this MySQL server'


Expected Results:  
no errors

A workaround is to give a local root password and then grant remote access for
the root user with this sql statement (on the mysql db):


mlibrary mysql # /usr/bin/mysqladmin -u root password 'asdf'
mlibrary mysql # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.18

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

mysql> grant all on *.* to root@'%' identified by 'asdf' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2004-06-24 08:27:06 UTC
could you paste /etc/hostname
and attach /etc/hosts 
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-09-06 19:03:39 UTC
no response from user.