(Updated for 2017)
When you installed MySQL it generated a password for the root user. You can connect using
/usr/local/mysql/bin/mysql -u root -p
and type in the generated password.
Previously, the root
user in MySQL used to not have a password and could only connect from localhost. So you would connect using
/usr/local/mysql/bin/mysql -u root
Related Posts:
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- Installing Homebrew on OS X
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- Terminal error: zsh: permission denied: ./startup.sh
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- brew install mysql on macOS
- mvn command not found in OSX Mavrerick
- How to install Java 8 on Mac
- Install Visual Studio 2015 on mac
- Change default title in mac terminal window
- mvn command not found in OSX Mavrerick
- How to use vim in the terminal?
- -bash: export: `=’: not a valid identifier
- How to use vim in the terminal?
- OS X cp command in Terminal – No such file or directory
- Can’t connect to MySQL server on ‘127.0.0.1’ (61) on Mac
- psql: FATAL: role “postgres” does not exist
- Reset MySQL root password using ALTER USER statement after install on Mac
- Run script on mac prompt “Permission denied”
- Finding text inside a folder using terminal
- cannot download, $GOPATH not set
- gdb debugging in Terminal OS X (10.8.5) with zsh
- How do you stop MySQL on a Mac OS install?
- How can I display the current branch and folder path in terminal?
- How to navigate to to different directories in the terminal (mac)?
- Open Sublime Text from Terminal in macOS
- Unable to access MySQL after it automatically generated a temporary password
- How do I install pip on macOS or OS X?
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- How can I run python in terminal on a mac?
- Where to place $PATH variable assertions in zsh?
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- How to view / open a calculator in mac OS X?
- How to uninstall Python 2.7 on a Mac OS X 10.6.4?
- VirtualBox NS_ERROR_FAILURE (0x80004005) macOS
- How do I upgrade to Python 3.6 with conda?
- pip or pip3 to install packages for Python 3?
- How to install JQ on Mac on the command line?
- SocketException: Address already in use MONGODB
- Why is the apt-get function not working in the terminal on Mac OS X v10.9 (Mavericks)?
- OS X: equivalent of Linux’s wget
- ImportError: No module named sklearn (Python)
- What’s a good hex editor/viewer for the Mac?
- OS X: equivalent of Linux’s wget
- How to switch Python versions in Terminal?
- How to change default Python version?
- What version of Python is on my Mac?
- How do you update Xcode on OSX to the latest version?
- Mongod complains that there is no /data/db folder
- How can I open the Atom editor from the command line in OS X?
- How to uninstall Docker completely from a Mac?
- How to easily install and uninstall docker on MacOs
- How to install wget in macOS?
- Maven Install on Mac OS X
- editing PATH variable on mac
- keep getting “? Something is already running on port 3000” when I do npm start on react app
- How to update Ruby with Homebrew?
- Upgrade Node.js to the latest version on Mac OS
- Recursively find all files that match a certain pattern
- Installing cgdb on a mac os x
- How do I update the password for Git?
- How can I install a previous version of Python 3 in macOS using homebrew?
- What is the “Illegal Instruction: 4” error and why does “-mmacosx-version-min=10.x” fix it?
- Xampp MySQL not starting – “Attempting to start MySQL service…”
- How can I Remove .DS_Store files from a Git repository?
- Shared folder between MacOSX and Windows on Virtual Box
- VirtualBox: mount.vboxsf: mounting failed with the error: No such device
- Installing GCC on macOS Catalina
- gdb fails with “Unable to find Mach task port for process-id” error
- How do I edit $PATH (.bash_profile) on OS X?
- matplotlib: RuntimeError: Python is not installed as a framework
- Can’t open the mysql.plugin table. Please run mysql_upgrade to create it
- Arduino IDE is not showing any port macOS
- gcloud command not found – while installing Google Cloud SDK
- boto3 python 2.7 ImportError: No module named boto3 USER_BASE USER_SITE site packages doesn’t exist
- Python: source code string cannot contain null bytes
- Python can’t find module NLTK
- Making sure /usr/local/bin is in my $PATH on mac
- Why does cURL return error “(23) Failed writing body”?
- Command not found go — on Mac after installing Go
- How to install pip for Python 3 on Mac OS X?
- Updating php version on mac
- Reading syslog output on a Mac
- Failed to launch macOS app built in Xcode
- Testing web application on Mac/Safari when I don’t own a Mac
- What is the best/safest way to reinstall Homebrew?
- How to completely uninstall Android Studio on Mac?
- SQL Client for Mac OS X that works with MS SQL Server
- How to stop mysqld
- Is there an equivalent of lsusb for OS X
- How do I install pip on macOS or OS X?
- How to install latest version of openssl Mac OS X El Capitan
- How to restart a node.js server
- What specific database privileges does WordPress need?
- What is the most secure way to set up the MySQL user in WPMU?
- Create a quick start wordpress installation [closed]
- WordPress installation on valet php 8 (PHP Fatal error: Uncaught mysqli_sql_exception Table ‘wp_options’ doesn’t exist in wp-includes/wp-db.php:2056)
- How can I fix WordPress installation errors?
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)