Benches Mac desktops

4

access denied for mysql in terminal

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I bought a mac mini 2018 (with Mojave installed) as I was led to believe that apple were good for software development, not just expensive status symbols.

I have been using my ancient PC (win10) to play with PHP/PDO/MySQL with some success. At least the code runs and works.

I can get Apache and PHP to work on my mini, but try as I might I cannot get MySQL to do anything. (Access denied.) There does not appear to be any guaranteed way of installing MySQL to work on mac os. The problem seems to go back years, and even now I am sure other people have the same problem.

Unless some kind soul can come up with a guaranteed method of installing MySQL on Mojave THAT WORKS, my only solution is to take my mac mini to an Apple showroom and challenge them to fix it.

For the record, if anyone asks me which is best for PHP/MySQL development, it has to be win10 as at least IT WORKS.

I trust that someone can improve my impression of Apple as so far I am not really impressed. Still trying to work out what to do with an Apple computer that cannot develop a PHP/MySQL database.

Thanks in advance to any kind person who can assist.

Roy Mace.

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    John Lockwood

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You do not indicate how Apache and PHP were installed or more importantly MySQL.

    All Macs come with a version of Apache and PHP as standard but no Macs come with MySQL installed as standard. For the sort of work you describe it is therefore far more common to install a combined package containing all three pieces of software.

    See - https://www.mamp.info/en/

    The non-pro version is free to use.

    Alternatively you can download and install MySQL by itself, this would be the full genuine (community edition) MySQL not the limited version part of MAMP. See - https://dev.mysql.com/downloads/mysql/

    For manual non-MAMP installs :-

    see - https://coolestguidesontheplanet.com/install-apache-mysql-php-on-macos-mojave-10-14/

    or - https://medium.com/@jangid.hitesh2112/install-apache-mysql-php-macos-mojave-10-14-b6b5c00b7de

    or - https://www.dyclassroom.com/howto-mac/how-to-install-apache-mysql-php-on-macos-mojave-10-14

    or - https://jasonmccreary.me/articles/install-apache-php-mysql-mac-os-x-mojave/

  2. 0

    SadCanary

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    John Lockwood.

    Thanks for the prompt response.

    I have already tried coolestguides and jasonmccreary (I think), both giving "Access denied" for mysql.

    I will try mamp and see if I have any success. I will report back either way.

    Thanks again.

    Roy.

  3. 0

    John Lockwood

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If you are doing something like -

    mysql -u root -p

    and entering a valid password and getting connection rejected message like

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Then this is almost certainly because your using the wrong password. For main admin functions you use the special root account not your Mac login account. This is a purely MySQL account not linked to any corresponding Mac account.

  4. 0

    Michael Black

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Mac OS is a POSIX standard UNIX operating system. If you know UNIX or Linux, installing things like MySQL is simple, but also quite different than working in Windows.

    When you install the Community edition of MySQL it does create a temporary password that you would use for first access - that temp password is displayed during the installation and setup steps - see the instructions at https://dev.mysql.com/doc/refman/8.0/en/installing.html