mysqldump -u username -p --add-drop-table database_name > data-dump.sql
mysql -u username -p database_name < data-dump.sql
mysql -u your-username-here -p
NOTE: Don't provide your password until MariaDB asks for it.
mysql -u your-username-here
CREATE USER your-username-here@localhost IDENTIFIED VIA mysql_native_password;
CREATE USER your-username-here@localhost IDENTIFIED VIA unix_socket;
First, while loggedin as the admin user (root)
USE mysql;
then...
UPDATE user SET password=PASSWORD('your-password-here') WHERE User='your-username-here' AND Host = 'localhost';
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password;
CREATE DATABASE database_name;
UPDATE db_name.table_name SET column_name='something' WHERE table_name='something_else';
GRANT ALL privileges ON mydb.* TO your-username-here@localhost;
or
GRANT ALL PRIVILEGES ON mydb.* TO 'your-username-here'@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
Always flush privileges after making changes to the database.