Categorized | News

MySQL tips part 2

Posted on 19 July 2002 by Demian Turner

MySQL tips
Please see the MySQL documentation of version 3.23.39 for more information.
Section and page numbers used below refer to the PDF format of the MySQL manual.
shell> indicates commands to be executed from the directory where MySQL is installed.
mysql> indicates commands to be executed while connected to the server.

Bringing up the server
use the safe_mysqld command to bring up the server
  shell> bin/safe_mysqld -u root &

Bookmark and Share

1 Comments For This Post

  1. demian Says:

    To change your password:
    mysql> SET PASSWORD FOR user@localhost IDENTIFIED BY PASSWORD(‘new_password’);

    The reason this does not work for you is because you should not be using the PASSWORD() function here. Should be "IDENTIFIED BY ‘new_password’;"

    mysql> UPDATE user SET PASSWORD=PASSWORD(‘new_password’) WHERE User=’user_name’;

    To remove a user:
    mysql> USE mysql;
    mysql> DELETE FROM user WHERE User=’user_name’;

    Anytime you directly update the mysql authentication data using INSERT, DELETE, UPDATE, you need to run the "FLUSH PRIVILEGES;" command to make the changes take effect (also you can restart the server). GRANT and friends automatically do this.

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up