Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: how to set up mysql database on local machine

  1. #1
    Join Date
    Dec 2010
    Location
    Hampshire-UK
    Posts
    122

    Question how to set up mysql database on local machine

    please can somebody tell me how to set up a mysql database on a local machine?

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: how to set up mysql database on local machine

    Not sure what you mean; if you mean start using mysql, then
    mysql -u root
    will get you started but you then need to give yourself a root password, remove the anonymous users, add normal users and grant them privileges. There are various threads on these issues and there is info mysql to consult.

    If you mean you want to move an existing mysql database to your local machine, the easiest way is to back it up with mysqldump and then start mysql as described above and enter
    source <filename>
    If you have backed up all the databases on the other machine including the user database, you will find that all the other users and their privileges have been transferred at the same time. Then you need to
    flush privileges;
    and you will effectively have a clone of what was on the other machine.

  3. #3
    Join Date
    Dec 2010
    Location
    Hampshire-UK
    Posts
    122

    Default Re: how to set up mysql database on local machine

    ok i tried that 'mysql -u root' and got ' (ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2))
    any ideas?

  4. #4
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,048

    Default Re: how to set up mysql database on local machine

    On Wed, 16 Mar 2011 19:06:02 +0000, lukemersh wrote:

    > ok i tried that 'mysql -u root' and got ' (ERROR 2002 (HY000): Can't
    > connect to local MySQL server through socket '/var/run/mysql/mysql.sock'
    > (2))
    > any ideas?


    Try starting the daemon.

    sudo /etc/init.d/mysqld start

    You might want to do some reading at http://dev.mysql.com/doc/ to learn
    how to use the product.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  5. #5
    Join Date
    Dec 2010
    Location
    Hampshire-UK
    Posts
    122

    Default Re: how to set up mysql database on local machine

    Quote Originally Posted by hendersj View Post
    On Wed, 16 Mar 2011 19:06:02 +0000, lukemersh wrote:

    > ok i tried that 'mysql -u root' and got ' (ERROR 2002 (HY000): Can't
    > connect to local MySQL server through socket '/var/run/mysql/mysql.sock'
    > (2))
    > any ideas?


    Try starting the daemon.

    sudo /etc/init.d/mysqld start

    You might want to do some reading at MySQL :: MySQL Documentation: MySQL Reference Manuals to learn
    how to use the product.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at openSUSE Forums FAQ
    tried that and got:
    @linux-qc6t:~> sudo /etc/init.d/mysqld start
    root's password:
    sudo: /etc/init.d/mysqld: command not found

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,977

    Default Re: how to set up mysql database on local machine

    Have you installed it? It is difficult for us to guess what you did, what you did not, what you allready read/studied and what not when you talk to us in one and a half line messages.
    Henk van Velden

  7. #7
    Join Date
    Dec 2010
    Location
    Hampshire-UK
    Posts
    122

    Default Re: how to set up mysql database on local machine

    Quote Originally Posted by hcvv View Post
    Have you installed it? It is difficult for us to guess what you did, what you did not, what you allready read/studied and what not when you talk to us in one and a half line messages.
    im sure i have installed it via yast. maybe i should download it manually??

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,977

    Default Re: how to set up mysql database on local machine

    Why download manualy? I only asked if you have installed it. Do not try to make it more difficult as it is.

    When you have installed it (either using YaST or zypper), you could go to YaST > System > System services (runlevel). Look there for mysql in the llist and change it to yes. This should start the daemon (and also on boot).
    Henk van Velden

  9. #9
    Join Date
    Dec 2010
    Location
    Hampshire-UK
    Posts
    122

    Default Re: how to set up mysql database on local machine

    cool, you was right, it wasnt on doh...

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: how to set up mysql database on local machine

    On 2011-03-16 21:06, lukemersh wrote:

    > sudo: /etc/init.d/mysqld: command not found


    No final 'd'. Or "rcmysql start", as root.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

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