In my basic understanding of SQL security, under Security > Logins > add your account here.
Then in Databases > DBName > Security > Users > add the login there.
Right click the newly added account and checkmark the databases for access
We didn’t have the proper security settings after moving the SCCM database.
Here are some MySQL commands I can never seem to remember:
Setup the Mysql DB:
/usr/bin/mysql_install_db
Setup root password:
/usr/bin/mysqladmin -u root password ‘new-password’
Backup:
/usr/bin/mysqldump –add-drop-table dbname > /path/to/dbname.sql
Restore:
/usr/bin/mysql -u username -p dbname < /path/to/dbname.sql
or
/usr/bin/mysqlimport dbname /path/to/dbname.sql
Grant:
You may need to run:
/usr/bin/mysql_fix_privilege_tables
/usr/bin/mysql -u root -p
use mysql;
GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit;
Create:
create database dbname;
Switch DB:
use dbname;