MySQL Forums
Forum List  »  Install & Repo

ERROR 1045 (28000): Access denied - no matter what I do
Posted by: czezz czezz
Date: March 31, 2017 05:42AM

Hi,
im having a problem accessing freshly installed MySQL
ubuntu: 12.04
mysql: 5.5

No matter what I do I cannot access db. What I am doing wrong?


root@452e6d55d873:/# mysqld_safe &
[1] 9
root@452e6d55d873:/# 170331 11:23:29 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
170331 11:23:29 mysqld_safe Logging to '/var/log/mysql/error.log'.
170331 11:23:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

root@452e6d55d873:/# mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@452e6d55d873:/# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

root@452e6d55d873:/# mysql_install_db
Installing MySQL system tables...
170331 11:23:40 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170331 11:23:40 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
170331 11:23:40 [Note] /usr/sbin/mysqld (mysqld 5.5.54-0ubuntu0.12.04.1) starting as process 394 ...
OK
Filling help tables...
170331 11:23:40 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170331 11:23:40 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
170331 11:23:40 [Note] /usr/sbin/mysqld (mysqld 5.5.54-0ubuntu0.12.04.1) starting as process 400 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h 452e6d55d873 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

root@452e6d55d873:/# /usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

root@452e6d55d873:/# mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@452e6d55d873:/# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Options: ReplyQuote


Subject
Written By
Posted
ERROR 1045 (28000): Access denied - no matter what I do
March 31, 2017 05:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.