mysql start ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password

running openSuse 12.1 . on a notebook…

well i configured apache 2 and mysql - (after starting it on the runlevel.

well - i did all i needed to do - but now i stuck…

after installing phpmyadmin . i tried to find the site … i couldnt

then i tried to start the mysql via command line - which failed … duhhhhhh??? What can i do now - what is wrong here

linux-wyee:/home/martin # mysql start 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
linux-wyee:/home/martin # 

hmmm i have no glue - probably i have messed up some passwords . what do you think!

how can i make sure that all runs nice -and nothing - that means no pART OF the apache2, mysql and all that things

quits to work propperly

What are you trying to do?
With “mysql start” you are not starting the server but the client and try to connect to a database named “start” as the current user (root?).

You can find the mysql manuals here: MySQL :: MySQL Documentation: MySQL Reference Manuals
and read more about how to use it.

regards,
Hendrik

hello dear Hendrik

many thanks for the answer!

if i start it with the runlevel then i get

/etc/init.d/mysql start gab 0 (Erfolg) zurück:

as you are German then you can see - this was successfully

all i wonder is where the phpmyadmin is!?

i have installed it with yast -

the APACHE2 works fine -

http://localhost
gives back -> it works

and this gives back

http://localhost/phpMyAdmin



Objekt nicht gefunden!

Der angeforderte URL konnte auf dem Server nicht gefunden werden. Sofern Sie den URL manuell eingegeben haben, überprüfen Sie bitte die Schreibweise und versuchen Sie es erneut.

Sofern Sie dies für eine Fehlfunktion des Servers halten, informieren Sie bitte den Webmaster hierüber.
Error 404
localhost
Di 13 Mär 2012 22:51:08 CET
Apache/2.2.21 (Linux/SUSE) 

well - i am not sure what happened…
the installation of the phpmyadmin was smoothly - /note i did this several times before - also on other machines,…

note: again; i started with the yast-runlevel the

a. Apache 2
b. MySQL

(see also above) all that went nice and smoothly
all i have to complain is - where is the phpmyadmin…!?

btw: can it be rooted in the following circumstance!? wihtin the mysql.- configuration i defined a password that differs form the system-password that i use as user for the access of the whole
machine…

Note; i have choosen a passwd that differs from the (global) passwd . Question - does this make and troiubles with accessing the phpMyAdmin!?

i do not think so,… i look forward to a fruiltful discussion and a solution of this issue…

greetings

martin@linux-wyee:~> su
Passwort:
linux-wyee:/home/martin # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables…
… Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y

  • Dropping test database…
    … Success!
  • Removing privileges on test database…
    … Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Well, as I don’t use apache or phpmyadmin I can’t help you with these matters.
But I work with different kinds of databases all day long. The database logins (and passwords) in mysql are separate from the operating system logins.
So this should be no issue.

regards,
Hendrik

On 2012-03-14 21:46, hendwolt wrote:
>
> Well, as I don’t use apache or phpmyadmin I can’t help you with these
> matters.
> But I work with different kinds of databases all day long. The database
> logins (and passwords) in mysql are separate from the operating system
> logins.

IIRC mysql has different passwords for the same user depending on how you
connect. network 127 or 192 or local, etc. The user may be the same for
all, undefined, etc.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

This message occurs when there is no password for root. In the default installation, root has no password. Have you tried starting mysql without a password and then set a password in mysql.user?

hello john, hello henrik hello dear john,

many many thanks for answering

well i a m a bit confuest : first of all … i guess that i don t need to start a / the client after starting server and the mysql.server via runlevel in yast!!?
what do you think=´?

love to hear from you

Right, you don’t need to start the client.
If you want to check, if the server is running, issue the following command:

systemctl status mysql.service

The interesting line of the output of this command starts with “Active:”.
If the server is running you should see there “active”; and behind that more detailed information.

regards
Hendrik