spikesource hints'n'tips

Our Top Tags

                                       

Mailing List

Keep uptodate with the latest hints'n' tips as they are published by signing up to our mailing list.

Our RSS Feeds








Latest Linux News

Open Source Business Cluster Launched in New South Wales

Wednesday, 19 November 2008
IT Wire: "Headquarters in Sydney, New South Wales, an Open Source Business Cluster was announced. The aim of the cluster is to more effectively market, deliver and provide support for Open Source tech

PHP Zend Framework 1.7 adds Adobe support

Wednesday, 19 November 2008
Netstat -vat: "The open source Zend Framework 1.7 is now available expanding the PHP framework to work better with Adobe Flex and AIR applications."

Progex 8.20 ScreenShots

Wednesday, 19 November 2008
Linux Dynasty: "Here is a fairly new Linux distribution and like many new ones out there this distribution is based off of Ubuntu Linux. The installation was just an easy 7 steps just as most other Ub

Zeroshell Delivers Big Network Services in a Small Package

Wednesday, 19 November 2008
LinuxPlanet: "What gives you a firewall, load-balancing, QoS, 3G support, RADIUS, wireless access point, HTTP proxy, VPN, VLAN, PPPoE, captive portal, and a host of other useful security, authenticati

Improve Your Intelligence with Brain Workshop

Wednesday, 19 November 2008
Linux Journal: "Everywhere you turn there are "brain training" games that claim to help you "lower your brain age" or "boost your brain power" and other such marketing hyperbole. Much like saying a ce

Latest Digg Entries

Resetting the root password on MySQL and managing legacy password access

posted Friday, 18 August 2006
Reseting MySQL root password

Sometimes you need to reset the password on the main MySQL database instance.  You can do this by using:

  1. Log on to your system as either the Unix root user or as the same user that the mysqld server runs as.

  2. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the filename has the extension of .pid and begins with either mysqld or your system's hostname. You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:

    shell> kill `cat /mysql-data-directory/host_name.pid`

    Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.

  3. Create a text file and place the following command within it on a single line:

    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

    Save the file with any name. For this example the file will be ~/mysql-init.

  4. Restart the MySQL server with the special --init-file=~/mysql-init option:

    shell> mysqld_safe --init-file=~/mysql-init &


    The contents of the init-file are executed at server startup, changing the root password. After the server has started successfully you should delete ~/mysql-init.

  5. You should be able to connect using the new password.

Using older mysql client libraries to access versions 5.x

MySQL 5 introduced a new stronger password authentication for connecting clients. However, it may not always be possible to upgrade a client to the latest. To get around this, when creating the client user in MySQL 5 make sure you use OLD_PASSWORD() to save the password.

tags:  

links: digg this    del.icio.us    technorati    




Related Posts

Putting a MySQL query to sleep

Tuesday, 10 October 2006 8:05 A GMT
There are a number of reasons why you would want to put a MySQL query to sleep, here is how.

Resetting the root password on MySQL and managing legacy password access

Friday, 18 August 2006 3:16 P GMT
If you need to use an old client library with MySQL 5, or you need to reset the root mysql password, this entry looks at both.

Http client using digest authentication (in python)

Wednesday, 14 September 2005 8:00 A GMT
To test mod_auth_digmysql, you needed to test that it works so here are some testcases in python.

Introduction to using MySQLdb with python

Saturday, 10 September 2005 9:31 A GMT
MySQLdb is the Python DB API-2.0 interface and this blog looks at the using the MySQL from Python

How to backup and import a MySQL InnoDB database

Tuesday, 16 August 2005 10:56 A GMT
Details how to properly backup and then restore a Mysql database running Innodb as oppose to MyISAM.