question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MySQL Mac Installation Permission Issue

See original GitHub issue
  • System Information

    • Browser type and version
    • macOS High Sierra, version 10.13.6
    • Terminal
    • Node version: v6.11.0
    • Any error messages that may be in the console where you ran npm start
    • Any error messages in the JS console
  • Describe the bug

I run npm run db:setup:mysql and get the following output:

> mikeworks-sql@0.0.0 db:setup:mysql /Users/Mac/sql
> scripty

Executing "/Users/Mac/sql/scripts/db/setup/mysql.sh":

> #!/usr/bin/env sh
> echo "\033[0;32mSetting Up MySQL Database. This may take a few minutes...\033[0m"
> echo "\033[1;33m - Removing any existing northwind database (you may need to provide a password)\033[0m"
> mysqladmin -f drop northwind
> echo "\033[1;33m - Removing any existing northwind_user user\033[0m"
> mysql -f -e "drop user 'northwind_user'@'localhost'";
> 
> echo "\033[1;33m - Creating northwind_user\033[0m"
> mysql -f -e "create user 'northwind_user'@'localhost' IDENTIFIED BY 'theWindi\$bl0wing';";
> 
> echo "\033[1;33m - Creating northwind database\033[0m"
> mysqladmin -f create 'northwind';
> 
> echo "\033[1;33m - Granting all northwind database permissions to northwind_user\033[0m"
> mysql -uroot -f -e "GRANT ALL PRIVILEGES ON northwind.* TO 'northwind_user'@'localhost';FLUSH PRIVILEGES;";
> 
> echo "\033[1;33m - Setting up schema from ./sql/northwind.mysql.sql \033[0m"
> mysql -f -D northwind < ./sql/northwind.mysql.sql
> echo "\033[1;33m - Importing data from ./sql/northwind_data.sql (this may take a while)\033[0m"
> mysql -f -D northwind < ./sql/northwind_data.sql
> 
> 


Setting Up MySQL Database. This may take a few minutes...
 - Removing any existing northwind database (you may need to provide a password)
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'Mac'@'localhost' (using password: NO)'
 - Removing any existing northwind_user user
ERROR 1045 (28000): Access denied for user 'Mac'@'localhost' (using password: NO)
 - Creating northwind_user
ERROR 1045 (28000): Access denied for user 'Mac'@'localhost' (using password: NO)
 - Creating northwind database
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'Mac'@'localhost' (using password: NO)'
 - Granting all northwind database permissions to northwind_user
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
 - Setting up schema from ./sql/northwind.mysql.sql 
ERROR 1045 (28000): Access denied for user 'Mac'@'localhost' (using password: NO)
 - Importing data from ./sql/northwind_data.sql (this may take a while)
ERROR 1045 (28000): Access denied for user 'Mac'@'localhost' (using password: NO)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mikeworks-sql@0.0.0 db:setup:mysql: `scripty`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mikeworks-sql@0.0.0 db:setup:mysql script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Mac/.npm/_logs/2018-08-18T17_34_27_534Z-debug.log
~/sql 534 $ 

Help please.

  • To Reproduce Steps to reproduce the behavior:
  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error
  • Expected behavior A clear and concise description of what you expected to happen.

  • Screenshots (optional) If applicable, add screenshots to help explain your problem.

  • Additional context (optional) Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jtt-berkeleycommented, Aug 20, 2018

killall -9 node worked!!! thank you Mike!!!

0reactions
mike-northcommented, Aug 20, 2018

Error: listen EADDRINUSE :::3000

You appear to have something running on port 3000

Try running killall -9 node to take care of any residual stuff that might be still running from a past attempt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing and running MySQL on macOS with errors resolved
This one is master hack. Just remove folder /usr/local/var/mysql and then reinstall mysql again brew reinstall mysql . (Note homebrew should be ...
Read more >
Access denied for user root - mysql on MAC OS - Stack Overflow
You can do the following on Mac (El Capitan). Open a Terminal window, use the command below to stop mysql if it's already...
Read more >
Permissions Issues (Mac OS X) - MySQL Forums
I recently got a macbook and I want to install mysql on it to interact with the apache server. I've never messed with...
Read more >
MariaDB(10.4.11) Permission Issues on OSX Catalina (10.15.3)
I'm setting up a new machine for development w/ OS X Catalina (10.15.3) and having issues with MariaDB/MySQL permissions. I installed Homebrew and...
Read more >
Install MySQL on Mac & Configure MySQL in Terminal
To get rid from this issue got to System Preferences > Security & Privacy and click on the “Open Anyway” button. This will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found