It's not the Why? that matters. It's the How can I do it myself?
I'm using Ubuntu 10.04 LTS Server. I just want to install a MySQL server, but for some reason it wont let me.
When I run apt-get install mysql-server everything works fine. At the end of the installation a modal window pops up an asks me to enter the root password. The only oddity here is that the encoding of the special chars (like the border of the modal window) is a bit messed up. But I assume that this isn't the major problem.
At the end of the installation MySQL starts automatically and everything works fine, until I try to login. mysql -u root -p prompts me to Enter password:. I enter the password I used during the installation and get this error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
When I try it with an empty password I get the same error, except of the (using password: YES) part which turns to (using password: NO).
I did some Google research and already tried all that mysqld_safe --skip-grant-tables & thingy.
I also checked the mysql user table. The only entry is the debian-sys-maint user.
mysql> SELECT * FROM user;
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost | debian-sys-maint | *A632698FAB70686111EB0BE3F732A4C244B6DE8C | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
mysqld_safe --skip-grant-tables &thing and got into the MySQL user table it only showed me thedebian-sys-maint, so I guessed a root user wasn't created. If I'm not right, feel free to correct me. – silvinci Jan 21 at 23:56whiptail --yesno oink 10 20for example. – Mattias Ahnberg Jan 22 at 0:08