adspace
How to allow the user "sonia" to connect to the server from localhost using the password "passwd". Login as root. Switch to the mysql db. Give privs. Update privs.
Answer Posted / Sanjay Kumar Jain
To allow the user 'sonia' to connect to the server from localhost using the password 'passwd' in MySQL, you need to login as root, switch to the mysql database, grant privileges using GRANT command, and update privileges using FLUSH PRIVILEGES command. Here's an example: `mysql -u root; CREATE USER 'sonia'@'localhost' IDENTIFIED BY 'passwd'; GRANT ALL PRIVILEGES ON your_database_name.* TO 'sonia'@'localhost'; FLUSH PRIVILEGES;`
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers