Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:13:30+00:00 2026-06-07T17:13:30+00:00

I’ve just set up MySQL on my computer (OS X 10.7), and it seems

  • 0

I’ve just set up MySQL on my computer (OS X 10.7), and it seems to be working, judging by the “mysqld” in the activity monitor and the new icon in my System Preferences.

However I’m having trouble doing anything with MySQL, as I need to login at least as the root user, but it doesn’t let me. So let’s run through what I’ve been doing and what error messages I’m getting:

Firstly, I start up MySQL via the “mysql” unix executable file. This seems to work, as my entries are now preceded with

 mysql> 

Also, I can type

 help;

and I get MySQL’s help list. So then I go to do something, like create a database:

 CREATE DATABASE books;

but I get the following error:

 ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'books'

So then I figure I need to login, and that logging in as the root user should be enough. I enter the following:

 mysql -u root -p;

But I get the 1064 error saying my syntax is wrong. I’ve had a look around through a number of websites, and this never seems to be a problematic step. Any clues on what’s going wrong for me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:13:32+00:00Added an answer on June 7, 2026 at 5:13 pm

    At the OSX Terminal prompt you enter mysql -u root to actually start the command line client that connects to the server.

    shell> represents whatever your shell prompt actually looks like.

    You do not enter this in after you have already typed mysql at the command line prompt.

    Here is an example session:

    shell> mysql -u root
    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
    mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newpwd');
    mysql> SET PASSWORD FOR 'root'@'::1' = PASSWORD('newpwd');
    mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
    

    NOTE: you might need to preface the shell> mysql -u root with shell> sudo mysql -u root

    My shell prompt is customized to be[jhr@Blackintosh] [/usr/local/mysql-5.5.25a-osx10.6-x86_64/bin] with a \n on the end so ./mysql -u root it typed at the on the next line down. The rest is what the output of that command should be. The shell prompt is replaced by the prompt of the mysql program prompt.

    Here is what my shell output looks like

    [jhr@Blackintosh] [/usr/local/mysql-5.5.25a-osx10.6-x86_64/bin] 
    ./mysql -u root
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 5
    Server version: 5.5.25a MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
For some reason, after submitting a string like this Jack’s Spindle from a text
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.