SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    Location
    North Londoner Living and working in France
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Build Your Own Database Driven Web Site Using PHP & MySQL - LOGGING ON MYSQL

    Hello,

    I am just getting started with PHP & MYSQL. I have had MAMP installed for quite a while and have used it to dabble in local development mostly with Wordpress.

    Following along with the instructions in the book "Build Your Own Database Driven Web Site Using PHP & MySQL; I installed MySQL Server. All the terminal commands were reacting as set out in the book.

    But.... I am now trying to connect to the MySQL server using the command:

    Code:
    mysql -u root -p
    I enter my password and I keep getting the following error:

    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    I even went ahead and changed my password (via MAMP) but still no joy.

    I am getting the feeling that there might be some kind of conflict between the MAMP program and the newly installed MySQL Server program but I have no idea how to sort this out.

    As you can imagine, I am hyped to get started with the coding/programming

    How do I solve this?

    Thank you in advance for your help

    KCO

  2. #2
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe install a MySQL client for Mac. Sequel Pro is really good.

    Make sure for the Host you type: localhost (because MySQL is actually installed on your local machine).

  3. #3
    SitePoint Member
    Join Date
    Dec 2011
    Location
    North Londoner Living and working in France
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers feketegy! I actually installed the MySQL client (for MAC systems) as quoted in the book. I got that straight from the MySQL site.

    Everything isworking fine until I try and connect to the server.

    It will not except my existing password as configured via MAMP:

    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Could you please explain how a new MySQL client (Sequel Pro) may solve this problem?

    Thank you for your help

    KCO

  4. #4
    SitePoint Member
    Join Date
    Dec 2011
    Location
    North Londoner Living and working in France
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I'm in!!!

    I have been searching arounfd the net for the last few hours and found this page:

    http://superuser.com/questions/78088...h-the-terminal

    I enter this into the terminal:

    Code:
    /Applications/MAMP/Library/bin/mysql -uroot -p
    and I got:

    Code:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version: 5.1.37 Source distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    I guess that I had to use the 'path' to mysql in MAMP

    Eitherway, I am in so I can continue with the book Yay!!

    BTW, @ feketegy, I checked out Sequel Pro. That is a very useful bit of kit! It will defo come in handy later on but I really want to nail this Terminal command bit.

    Anyway, thanks for replying (thanks for your help)

    KCO

  5. #5
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,265
    Mentioned
    246 Post(s)
    Tagged
    1 Thread(s)
    Glad that you sorted it out and found the answer Well done and good job.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •