Could anyone help me please? I wolud like to know how to change user in MySql. That is, I created another user besides the default user root but i want to be logged in to the us
you can create different user and add different privileges to user as below:
CREATE USER 'username'@'%' IDENTIFIED BY
PASSWORD '*AAB3E285149C0135D51A520E1940DD3263DC008C';
GRANT SELECT ON database_name.table_name TO 'username'@'%';
And use below command to log in:
mysql -uusername -ppassword databasename;
In command prompt
mysql -h host -u username -p
Form mysql documentation:
shell> mysql --user=user_name --password=your_password db_name
Then type an SQL statement, end it with “;”, \g, or \G and press Enter.