You are not logged in.

#1 2017-09-24 11:35:52

mathio13
Member
Registered: 2017-07-08
Posts: 8

[SOLVED] mysql Access denied

hello
need help I cant access mysql and  add user in mysql or edit db

I am using
sudo mysqld_safe --skip-grant-tables
FLUSH PRIVILEGES;
output: Access denied   
/usr/bin/mysql_secure_installation: line 248: .my.cnf.14238: Permission denied
output: Access denied   
how I can fix it

Last edited by mathio13 (2017-10-01 01:04:49)

Offline

#2 2017-09-24 11:45:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] mysql Access denied

The error is pretty clear, the secure_installation script is trying to write to a file but lacks permission.

You are supposed to run that command as root, not with sudo.

https://wiki.archlinux.org/index.php/He … er_or_root

Last edited by Trilby (2017-09-24 11:46:04)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-09-25 15:03:17

mathio13
Member
Registered: 2017-07-08
Posts: 8

Re: [SOLVED] mysql Access denied

thank you #Trilby I fix it it using just this  :
$ mkinitcpio -p linux
$ reboot
WORKED

Last edited by mathio13 (2017-09-25 15:03:37)

Offline

#4 2017-09-25 15:11:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] mysql Access denied

*headdesk*

Those steps have absolutely nothing to do with your problem or the solution.  I gather when you ran it again after the reboot you did it properly as root.  The rebuild of the initramfs was just a conincidence.

In any case, if this is working, please edit your first post to mark it as [SOLVED].


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB