- Download mysql binaries from https://dev.mysql.com/downloads/mysql/
- Download mysql workbench from https://dev.mysql.com/downloads/workbench/
- Install mysql software by executing the downloaded mysql dmg binaries
- Reset password by navigating to System preferences -> mysql (root as user)
- Edit .bash_profile and add the following Line and save
cd /Users/rajanimaski
Pwd
Open .bash_profile
export PATH=${PATH}:/usr/local/mysql/bin/ - Reopen terminal window
- Enter mysql and this should connect to mysql terminal
- open mysql workbench
- Connect to localhost with root as user and given password
Commands
Show databases
Create database chinook;
Use chinook;
Show tables;
Via terminal
mysql -u root -p chinook --binary-mode -o
source /Users/rajanimaski/Datasets/ChinookDatabase/ChinookDatabase/DataSources/Chinook_MySql.sql
source /Users/rajanimaski/Datasets/ChinookDatabase/ChinookDatabase/DataSources/Chinook_MySql_AutoIncrementPKs.sql
References
No comments:
Post a Comment