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)
could you paste /etc/hostname and attach /etc/hosts
no response from user.