Everything works fine until mysql setup.
sudo apt install mysql-server php-mysql [works]
then
sudo mysql --user=root
everything go's to hell from here.
DROP USER 'root'@'localhost';
CREATE USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'
So anyone have to actual correct way of doing this, because every tutorial i can find is exactingly the same
Re: setting up a lamp is now a nightmare
Code: Select all
sudo mysql
Code: Select all
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'mypassword';
Code: Select all
mysql -u root -p
Code: Select all
mysql -u admin -p
Code: Select all
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'mypassword';
Code: Select all
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED with unix_socket;
Later MariaDB versions will support an "ALTER USER" statement to modify the authentication plugin.
Re: setting up a lamp is now a nightmare
thank you, although still would not let me grant privileges, I was able to install phpmyadmin and took it from there.
Re: setting up a lamp is now a nightmare
Now it is a mess again. I give up with mariondb Simply cannot get it to work on Raspi stretch
Re: setting up a lamp is now a nightmare
The latest LAMP version behaviour has changed with respect to the root user. Did you try my tutorial which I've just rewritten for the latest Stretch and incorporated some comments/fixes from fbe?
viewtopic.php?f=29&t=218354#p1460237 (also see earlier posts on that thread)
viewtopic.php?f=29&t=218354#p1460237 (also see earlier posts on that thread)
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574
Re: setting up a lamp is now a nightmare
Brilliant thank you:) My eyes were starting to bleed.
Re: setting up a lamp is now a nightmare
I spoke to soon, after getting back to it today, I find I have no permissions to do anything.
Re: setting up a lamp is now a nightmare
Sorry, forgot the "grant option" privilege when creating a superuser.
Code: Select all
pi@headless-pi:~ $ sudo mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.38-MariaDB-0+deb9u1 Raspbian 9.0
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> grant all privileges on *.* to 'admin'@'localhost' identified by 'secret' with grant option;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit;
Bye
pi@headless-pi:~ $ mysql -uadmin -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.38-MariaDB-0+deb9u1 Raspbian 9.0
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> grant all privileges on *.* to 'admin2'@'localhost' identified by 'secret' with grant option;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>