LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Problem logging into mysql database (https://www.linuxquestions.org/questions/linux-server-73/problem-logging-into-mysql-database-4175561504/)

kaplan71 12-15-2015 08:27 AM

Problem logging into mysql database
 
Hello --

I am running the package distribution of MySQL, 5.5.46, on an Ubuntu 14.04 distribution. I had set up a password for the root account during the installation process.

I need to log into the database, however when I do so at the console using the command syntax:

Quote:

mysql -u root
or

Quote:

mysql -u root@localhost
I get the following error message:

Quote:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO
How can I correct this?

Thanks.

robertjinx 12-15-2015 09:58 AM

Try this: https://www.howtoforge.com/setting-c...root-passwords

kaplan71 12-15-2015 11:48 AM

Hello --

Thank-you for your reply. The only problem with the procedure shown at the URL you mentioned, is the fact the error message indicates the password setting is 'YES', where the using password setting on my system is 'NO'.

Habitual 12-15-2015 01:21 PM

Try just
Code:

# mysql

robertjinx 12-15-2015 01:30 PM

Code:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
This means that the command used wasn't use with -p option, like:

Code:

mysql -u root -p

kaplan71 12-15-2015 03:00 PM

Hello --

I ran the command syntax:

Quote:

mysql -u root -p
which prompted me for the password. Once that was entered, I was able to get the mysql> prompt.

Thanks for the help.

robertjinx 12-16-2015 03:20 AM

Try to set this thread as SOLVED if all is OK.


All times are GMT -5. The time now is 04:43 AM.