ruby on rails with mysqladmin

Discussion in 'Ruby' started by a marc aurele, Sep 6, 2007.

  1. Hi all

    with :
    mysqladmin -u root create dummy_development

    I get :
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    all i have in terms of firewall is windows and the localhost:3000
    works for sure anyways, i even loaded a page on it.
    And the YML file shows me im ok , i dont need a password etc :

    development:
    adapter: mysql
    database: dummy_development
    username: root
    password:
    host: localhost

    I tried the same thing at work , no problems with it.
    Any ideas what's going on please ? thanks
     
    a marc aurele, Sep 6, 2007
    #1
    1. Advertising

  2. a marc aurele

    John Joyce Guest

    On Sep 6, 2007, at 10:25 AM, a marc aurele wrote:

    > Hi all
    >
    > with :
    > mysqladmin -u root create dummy_development
    >
    > I get :
    > mysqladmin: connect to server at 'localhost' failed
    > error: 'Access denied for user 'root'@'localhost' (using password:
    > NO)'
    >
    > all i have in terms of firewall is windows and the localhost:3000
    > works for sure anyways, i even loaded a page on it.
    > And the YML file shows me im ok , i dont need a password etc :
    >
    > development:
    > adapter: mysql
    > database: dummy_development
    > username: root
    > password:
    > host: localhost
    >
    > I tried the same thing at work , no problems with it.
    > Any ideas what's going on please ? thanks
    >
    >
    >

    This is really a mysql question, but here goes:
    you need to enter this:
    mysql -u username -p

    then the password.
    you don't need to use mysqladmin

    You might need to grant all priveledges to root, but you should not
    have to do that.

    After you entered the password you will be in a shell-like command
    line environment for mysql.
    You can try to do it all in one command line, but it's really a lot
    easier to do it one step at a time.
    in the mysql command line tool, enter your sql commands.
    A complete command is terminated with a semicolon ;
    if you press enter before typing a semicolon, it thinks you are going
    to type more, but you can always put the semicolon on the next line.
    to create a database you should use:
    create database db_name;
    to see all of them:
    show databases;

    Beyond that, pickup a copy of any good mysql book. The MySQL Phrase
    Book is good, but you might want Learning MySQL.
    You don't need to know a lot of it to use it with Rails or Ruby
    (active record) but if you use Ruby DBI you will need to have an SQL
    reference.
    You should get a reference book for any database you plan to use.
    The SQL Cookbook is a good choice as well. It will give you solutions
    for many different db's!
     
    John Joyce, Sep 6, 2007
    #2
    1. Advertising

  3. a marc aurele

    Guest

    Have you checked your task manager to see if the mysql service is
    running? Can you get into mysql with just: mysql -u root and then
    create it through there? Did you restart your computer? Have you tried
    uninstalling and reinstalling mysql?

    if yes to all of these, then I have no clue hopefully someone else
    does.


    ~Jeremy



    On Sep 6, 8:25 am, "a marc aurele" <> wrote:
    > Hi all
    >
    > with :
    > mysqladmin -u root create dummy_development
    >
    > I get :
    > mysqladmin: connect to server at 'localhost' failed
    > error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    >
    > all i have in terms of firewall is windows and the localhost:3000
    > works for sure anyways, i even loaded a page on it.
    > And the YML file shows me im ok , i dont need a password etc :
    >
    > development:
    > adapter: mysql
    > database: dummy_development
    > username: root
    > password:
    > host: localhost
    >
    > I tried the same thing at work , no problems with it.
    > Any ideas what's going on please ? thanks
     
    , Sep 6, 2007
    #3
  4. a marc aurele

    John Joyce Guest

    On Sep 6, 2007, at 12:30 PM, wrote:

    > Have you checked your task manager to see if the mysql service is
    > running? Can you get into mysql with just: mysql -u root and then
    > create it through there? Did you restart your computer? Have you tried
    > uninstalling and reinstalling mysql?
    >
    > if yes to all of these, then I have no clue hopefully someone else
    > does.
    >
    >
    > ~Jeremy
    >
    >
    >
    > On Sep 6, 8:25 am, "a marc aurele" <> wrote:
    >>

    Ah, yes, that is the other thing, you need to make sure the mysql
    server application is running!
    You can configure it to startup when your system starts up.
    You might also consider exploring the GUI apps that now come packaged
    with mysql. they can be pretty useful for beginners with mysql
     
    John Joyce, Sep 6, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    193
    Michael Campbell
    Mar 17, 2005
  2. Michael Schuerig
    Replies:
    3
    Views:
    235
    Carl Youngblood
    Jun 17, 2005
  3. Josef 'Jupp' SCHUGT
    Replies:
    5
    Views:
    188
    Stephan Kämper
    Jan 24, 2006
  4. Nathaniel Brown
    Replies:
    2
    Views:
    143
    gabriele renzi
    Mar 26, 2006
  5. Jason Wong
    Replies:
    0
    Views:
    176
    Jason Wong
    Nov 20, 2007
Loading...

Share This Page