Sama tulos: Access denied. Olen aiemmin myös kokeillut poistaa Mysql:n asennuksen kokonaan ja asentaa uudelleen, mutta en päässyt uudelleen konfiguroimaan sitä ja valittaa edelleen Access deniedia.
Miten ja mitä koetit konfiguroida?
Kun kokeilin niin asensin vain peruspalikan
sudo -s
apt install mysql-server
Kun asennus hoidettu niin jatkoin (edelleen roottina, "sudo -s") käynnistämällä kantasession (ilman mitään tunnusta, salasanaa tai kantavalintaa):
root@E5500:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.22-0ubuntu18.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
josta jatkoin konffausta:
mysql> create database testi;
Query OK, 1 row affected (0.00 sec)
mysql> create user 'lamp'@'localhost' identified by 'salasana';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on testi.* to 'lamp'@'localhost';
Query OK, 0 rows affected (0.00 sec)
root@E5500:~# mysql -u lamp -psalasana testi
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.22-0ubuntu18.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Käynnistin kantasession roottina ja:
mysql> alter user 'lamp'@'localhost' identified by 'uusisana';
Query OK, 0 rows affected (0.00 sec)
root@E5500:~# mysql -u lamp -puusisana testi
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.22-0ubuntu18.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Mutta tuo muistiinmerkitsemäni ohje vaikuttaa vanhentuneelta, toki tuo /usr/bin/mysqld_safe on, mutta ei toimi odotetulla tavalla.
root@E5500:~# file /usr/bin/mysqld_safe
/usr/bin/mysqld_safe: POSIX shell script, ASCII text executable
root@E5500:~# wc -l /usr/bin/mysqld_safe
1006 /usr/bin/mysqld_safe
Enkä aio lukea mitä siellä on