login to mysql as admin user
mysql -u admin -p`cat /etc/psa/.psa.shadow`
login to mysql as a user with a database
mysql -u <user> -p<password> <database>
login to mysql as remotely
mysql -u <user> -p<password> <database> -h <ipaddress>
Grand Privilage to a user
grant all privileges on dbsbcstudio.* to ‘user name’@’localhost’ identified by ‘password’;
flush previlages
FLUSH PRIVILEGES;
Reset mysql user password
php myadmin users are mysql users, so if we need to reset password of phpmyadmin user reset the password as follows
In this abcde is the password and xxx is uer name
mysql> UPDATE user SET Password=password(“abcde”) WHERE User=”xxx”; //
mysql> FLUSH PRIVILEGES;
Grant access to remote IP address
mysql -u root -p mysqlGrant access to new database
new database aaa for user bbb and remote IP xxx.xxx.xxx.xxx
mysql> CREATE DATABASE aaa;
mysql> GRANT ALL ON aaa.* TO bbb@’xxx.xxx.xxx.xxx’ IDENTIFIED BY ‘PASSWORD’;
Leave A Comment
You must be logged in to post a comment.