Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Forgotten / lost MySQL root password

OK - I admit it. A very silly thing to do. I had lost / forgotten my MySQL password, and needed to do some admin work.

1. Log in to server as root

2. Stop the database server
  /etc/init.d mysql.server stop

3. Start the database server without password check
  /usr/local/mysql/bin/mysqld_safe --skip-grant-tables  

4. Manually change the grant tables
  /usr/local/mysql/bin/mysql -uroot
  use mysql;
  update user set password=PASSWORD("newpasswordhere") where user="root";
  flush privileges;
  quit


5. logout (which nicely kills the backgrounded daemon)

6. Log in as root again

7. Restart the server normally
  /etc/init.d mysql.server stop

8 Logout
(written 2015-05-16)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
S161 - Data Access and Security in MySQL
  [4491] Web Server Admin - some of those things that happen, and solutions - (2015-05-10)
  [4481] Extracting data from backups to restore selected rows from MySQL tables - (2015-05-01)
  [4406] Fixing damaged MySQL tables - Error 1712 and Error 2013 - (2015-01-25)
  [4390] Checking MySQL database backups have worked (not failed) - (2015-01-10)
  [3270] SQL - Data v Metadata, and the various stages of data selection - (2011-04-29)
  [2647] Removing duplicates from a MySQL table - (2010-02-22)
  [2263] Mysqldump fails as a cron job - a work around - (2009-06-30)
  [2204] Images in a database? How big is a database? (MySQL) - (2009-05-28)
  [1131] MySQL - Password security (authentication protocol) - (2007-04-02)
  [947] What is an SQL injection attack? - (2006-11-27)
  [647] Checking for MySQL errors - (2006-03-15)
  [535] MySQL permissions and privileges - (2005-12-20)
  [401] What is an SQL injection attack? - (2005-08-02)
  [193] The wrong MySQL - (2005-01-29)
  [192] Current MySQL and PHP paths and upgrades - (2005-01-28)


Back to
Almost so wrong, but perhaps it's right for some?
Previous and next
or
Horse's mouth home
Forward to
Monday to Friday / TransWilts train times from 18 May to 11th December 2015
Some other Articles
Around the world from Melksham
Sunday train times - 17th May to 6th September 2015
Swindon to Westbury train services - Saturdays from 23rd May 2015
Monday to Friday / TransWilts train times from 18 May to 11th December 2015
Forgotten / lost MySQL root password
Almost so wrong, but perhaps it's right for some?
What and where are the Azores?
Election results - what if we had a party list system?
Election day, 2015
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4493_For ... sword.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat