Some notes here for me:
1) When i installed mariadb and after running
2) Part of the reason for this is I was logged in as root #, the other part is I do not have sudo installed.
3) There is a way to fix this. Run the following commands:
These are notes for me so if I have this problem again. I will search the forums see this. Know I did it and feel silly for having to look up my own notes.
1) When i installed mariadb and after running
mysql_secure_installation
, it would still allow root access to mariadb without a password.2) Part of the reason for this is I was logged in as root #, the other part is I do not have sudo installed.
3) There is a way to fix this. Run the following commands:
Code:
root# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 10.5.10-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
root@localhost [(none)]>ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("password");
Query OK, 0 rows affected (0.001 sec)
root@localhost [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
root@localhost [(none)]> quit
Bye
root@nexus:~ # mysql -u root -p
Enter password: wrong password
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@nexus:~ # mysql -u root -p
Enter password: correct password
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.5.10-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
root@localhost [(none)]>
These are notes for me so if I have this problem again. I will search the forums see this. Know I did it and feel silly for having to look up my own notes.