1. Download mysql and then install macos dmg file depending on your system and install it and while installing make sure you setup good passport for user "root" and password once you setup.
2. Export path in bash_profile like this - export PATH="/usr/local/mysql/bin:$PATH"
3. Change your user to root user in macos by sudo -s
4. then run this command
mahes@Mukeshs-MacBook-Pro ~ % sudo mysql -u root -h localhost -p
Password:
but this will not work we have to change user mahes to root by this command
mahipal@Mukeshs-MacBook-Pro ~ % sudo -s
Password:
by entring system password
root@Mukeshs-MacBook-Pro ~ # sudo mysql -u root -h localhost -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Comments
Post a Comment