Tagged: mysql Toggle Comment Threads | Keyboard Shortcuts

  • Tushar Neupaney 6:04 am on July 1, 2010 Permalink | Reply
    Tags: , mysql, service, stop,   

    stop mysql from running at startup 

    My Linux box was running mysql from the start and I did have no clue. It was not in my startup applications list, neither in my init.d folders.

    But whenever i did nmap of localhost, i could see the mysql port open. I could kill mysql service, need to kill it multiple times, only then it used to die.

    I even installed “sysv-rc-conf” so that i could stop it at run levels, but it was not running at any runlevels. I then did “update-rc.d mysql disable”. Which didn’t work either.

    Later I found that there was a file called “mysql.conf” in /etc/init/ folder. I renamed the file to mysql.conf.disabled and it worked out. Hope this will help others who have the same problem.

     
  • Tushar Neupaney 9:15 am on July 8, 2009 Permalink | Reply
    Tags: mysql   

    Use MySql from Command Line 

    I tried a script and wanted it to change some settings in mysql as a part of it’s execution.
    So I did the following and it worked. You can try your own, have fun!

    #!/usr/bin
    mysql –user=root –password=MYPASSWORD –database=mysql –execute=”select * from user”

    in the execute command you can try all mysql commands and put them in your code. 🙂

     
  • Tushar Neupaney 9:10 am on July 8, 2009 Permalink | Reply
    Tags: Change Password, , mysql, Password, Recovery   

    Reset your password in MySQL (mysql) 

    There are times when you forget your password and if it is from mysql it really suck!
    No worries if you run your mysql system.

    For linux users I have the following command lines try them will work:

    Stop the MySQL Server.
    sudo /etc/init.d/mysql stop

    Start the mysqld configuration.
    sudo mysqld –skip-grant-tables &

    Login to MySQL as root.
    mysql -u root mysql

    Replace YOURNEWPASSWORD with your new password!
    UPDATE user SET Password=PASSWORD(‘YOURNEWPASSWORD’) WHERE User=’root’; FLUSH PRIVILEGES; exit;

    Enjoy 🙂

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel